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 = [
|
const menu = [
|
||||||
...(process.platform === 'darwin' ? [darwinMenu(commandKeys, showAbout)] : []),
|
...(process.platform === 'darwin' ? [darwinMenu(commandKeys, execCommand, showAbout)] : []),
|
||||||
shellMenu(commandKeys, execCommand),
|
shellMenu(commandKeys, execCommand),
|
||||||
editMenu(commandKeys, execCommand),
|
editMenu(commandKeys, execCommand),
|
||||||
viewMenu(commandKeys, execCommand),
|
viewMenu(commandKeys, execCommand),
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// The label is set to appName here so it matches actual behavior
|
// The label is set to appName here so it matches actual behavior
|
||||||
const {app} = require('electron');
|
const {app} = require('electron');
|
||||||
|
|
||||||
module.exports = (commandKeys, showAbout) => {
|
module.exports = (commandKeys, execCommand, showAbout) => {
|
||||||
return {
|
return {
|
||||||
label: `${app.getName()}`,
|
label: `${app.getName()}`,
|
||||||
submenu: [
|
submenu: [
|
||||||
|
|
@ -17,7 +17,10 @@ module.exports = (commandKeys, showAbout) => {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Preferences...',
|
label: 'Preferences...',
|
||||||
accelerator: commandKeys['window:preferences']
|
accelerator: commandKeys['window:preferences'],
|
||||||
|
click() {
|
||||||
|
execCommand('window:preferences');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,10 @@ module.exports = (commandKeys, execCommand) => {
|
||||||
{type: 'separator'},
|
{type: 'separator'},
|
||||||
{
|
{
|
||||||
label: 'Preferences...',
|
label: 'Preferences...',
|
||||||
accelerator: commandKeys['window:preferences']
|
accelerator: commandKeys['window:preferences'],
|
||||||
|
click() {
|
||||||
|
execCommand('window:preferences');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue