mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Fix Preferences menu item
This commit is contained in:
parent
ec6ecdd258
commit
c00c10ec11
3 changed files with 10 additions and 4 deletions
|
|
@ -48,7 +48,7 @@ exports.createMenu = (createWindow, getLoadedPluginVersions) => {
|
|||
});
|
||||
};
|
||||
const menu = [
|
||||
...(process.platform === 'darwin' ? [darwinMenu(commandKeys, showAbout)] : []),
|
||||
...(process.platform === 'darwin' ? [darwinMenu(commandKeys, execCommand, showAbout)] : []),
|
||||
shellMenu(commandKeys, execCommand),
|
||||
editMenu(commandKeys, execCommand),
|
||||
viewMenu(commandKeys, execCommand),
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// The label is set to appName here so it matches actual behavior
|
||||
const {app} = require('electron');
|
||||
|
||||
module.exports = (commandKeys, showAbout) => {
|
||||
module.exports = (commandKeys, execCommand, showAbout) => {
|
||||
return {
|
||||
label: `${app.getName()}`,
|
||||
submenu: [
|
||||
|
|
@ -17,7 +17,10 @@ module.exports = (commandKeys, showAbout) => {
|
|||
},
|
||||
{
|
||||
label: 'Preferences...',
|
||||
accelerator: commandKeys['window:preferences']
|
||||
accelerator: commandKeys['window:preferences'],
|
||||
click() {
|
||||
execCommand('window:preferences');
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
|
|
|
|||
|
|
@ -45,7 +45,10 @@ module.exports = (commandKeys, execCommand) => {
|
|||
{type: 'separator'},
|
||||
{
|
||||
label: 'Preferences...',
|
||||
accelerator: commandKeys['window:preferences']
|
||||
accelerator: commandKeys['window:preferences'],
|
||||
click() {
|
||||
execCommand('window:preferences');
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue