You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
@@ -20,6 +20,8 @@ const getLabel = (commandName: string): string => {
|
|||||||
return _('Website and documentation');
|
return _('Website and documentation');
|
||||||
case 'hideApp':
|
case 'hideApp':
|
||||||
return _('Hide Joplin');
|
return _('Hide Joplin');
|
||||||
|
case 'minimizeWindow':
|
||||||
|
return _('Minimise');
|
||||||
case 'closeWindow':
|
case 'closeWindow':
|
||||||
return _('Close Window');
|
return _('Close Window');
|
||||||
case 'config':
|
case 'config':
|
||||||
|
|||||||
@@ -843,6 +843,24 @@ function useMenu(props: Props) {
|
|||||||
label: _('&Tools'),
|
label: _('&Tools'),
|
||||||
submenu: toolsItems,
|
submenu: toolsItems,
|
||||||
},
|
},
|
||||||
|
window: {
|
||||||
|
id: 'window',
|
||||||
|
|
||||||
|
// Adds the default MacOS actions (e.g. "tile left") to the menu.
|
||||||
|
//
|
||||||
|
// Note: If the dev tools are shown on startup, this adds additional tab-related
|
||||||
|
// actions to the menu that are not otherwise shown. See https://stackoverflow.com/a/77458809
|
||||||
|
role: 'windowMenu',
|
||||||
|
|
||||||
|
label: _('&Window'),
|
||||||
|
visible: !!shim.isMac(),
|
||||||
|
submenu: [
|
||||||
|
{
|
||||||
|
role: 'minimize',
|
||||||
|
accelerator: shim.isMac() && keymapService.getAccelerator('minimizeWindow'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
help: {
|
help: {
|
||||||
label: _('&Help'),
|
label: _('&Help'),
|
||||||
role: 'help', // Makes it add the "Search" field on macOS
|
role: 'help', // Makes it add the "Search" field on macOS
|
||||||
@@ -946,6 +964,7 @@ function useMenu(props: Props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const template = [
|
const template = [
|
||||||
|
shim.isMac() ? rootMenus.macOsApp : null,
|
||||||
rootMenus.file,
|
rootMenus.file,
|
||||||
rootMenus.edit,
|
rootMenus.edit,
|
||||||
rootMenus.view,
|
rootMenus.view,
|
||||||
@@ -953,10 +972,9 @@ function useMenu(props: Props) {
|
|||||||
rootMenus.folder,
|
rootMenus.folder,
|
||||||
rootMenus.note,
|
rootMenus.note,
|
||||||
rootMenus.tools,
|
rootMenus.tools,
|
||||||
|
shim.isMac() ? rootMenus.window : null,
|
||||||
rootMenus.help,
|
rootMenus.help,
|
||||||
];
|
].filter(item => item !== null);
|
||||||
|
|
||||||
if (shim.isMac()) template.splice(0, 0, rootMenus.macOsApp);
|
|
||||||
|
|
||||||
if (props.routeName !== 'Main') {
|
if (props.routeName !== 'Main') {
|
||||||
setMenu(Menu.buildFromTemplate([
|
setMenu(Menu.buildFromTemplate([
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ const defaultKeymapItems = {
|
|||||||
{ accelerator: 'Cmd+Q', command: 'quit' },
|
{ accelerator: 'Cmd+Q', command: 'quit' },
|
||||||
{ accelerator: 'Cmd+,', command: 'config' },
|
{ accelerator: 'Cmd+,', command: 'config' },
|
||||||
{ accelerator: 'Cmd+W', command: 'closeWindow' },
|
{ accelerator: 'Cmd+W', command: 'closeWindow' },
|
||||||
|
{ accelerator: 'Cmd+M', command: 'minimizeWindow' },
|
||||||
{ accelerator: 'Cmd+C', command: 'textCopy' },
|
{ accelerator: 'Cmd+C', command: 'textCopy' },
|
||||||
{ accelerator: 'Cmd+X', command: 'textCut' },
|
{ accelerator: 'Cmd+X', command: 'textCut' },
|
||||||
{ accelerator: 'Cmd+V', command: 'textPaste' },
|
{ accelerator: 'Cmd+V', command: 'textPaste' },
|
||||||
|
|||||||
Reference in New Issue
Block a user