mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 06:59:09 +00:00
fix: recover edit menu and shortcuts
This commit is contained in:
committed by
Carlos Valente
parent
fb83f48752
commit
ef2ea9a1da
@@ -29,6 +29,7 @@ function getApplicationMenu(askToQuit, clientUrl, serverUrl, redirectWindow, sho
|
|||||||
const template = [
|
const template = [
|
||||||
...(isMac ? [makeMacMenu(askToQuit)] : []),
|
...(isMac ? [makeMacMenu(askToQuit)] : []),
|
||||||
makeFileMenu(serverUrl, redirectWindow, showDialog, download),
|
makeFileMenu(serverUrl, redirectWindow, showDialog, download),
|
||||||
|
makeEditMenu(),
|
||||||
makeViewMenu(clientUrl),
|
makeViewMenu(clientUrl),
|
||||||
makeSettingsMenu(redirectWindow),
|
makeSettingsMenu(redirectWindow),
|
||||||
makeHelpMenu(redirectWindow),
|
makeHelpMenu(redirectWindow),
|
||||||
@@ -61,6 +62,22 @@ function makeMacMenu(askToQuit) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility function generates the edit menu
|
||||||
|
* @returns {Object}
|
||||||
|
*/
|
||||||
|
function makeEditMenu() {
|
||||||
|
return {
|
||||||
|
label: 'Edit',
|
||||||
|
submenu: [
|
||||||
|
{ label: 'Cut', accelerator: 'CmdOrCtrl+X', role: 'cut' },
|
||||||
|
{ label: 'Copy', accelerator: 'CmdOrCtrl+C', role: 'copy' },
|
||||||
|
{ label: 'Paste', accelerator: 'CmdOrCtrl+V', role: 'paste' },
|
||||||
|
{ label: 'Select All', accelerator: 'CmdOrCtrl+A', role: 'selectAll' },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility function generates the file menu
|
* Utility function generates the file menu
|
||||||
* @param {string} serverUrl - base url for the application
|
* @param {string} serverUrl - base url for the application
|
||||||
@@ -253,7 +270,7 @@ function makeSettingsMenu(redirectWindow) {
|
|||||||
click: () => redirectWindow('/editor?settings=network__log'),
|
click: () => redirectWindow('/editor?settings=network__log'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Manage cleints',
|
label: 'Manage clients',
|
||||||
click: () => redirectWindow('/editor?settings=network__clients'),
|
click: () => redirectWindow('/editor?settings=network__clients'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user