hyper/app/menus/menus/darwin.js

53 lines
961 B
JavaScript
Raw Normal View History

// This menu label is overrided by OSX to be the appName
// The label is set to appName here so it matches actual behavior
const {app} = require('electron');
2017-11-03 13:06:48 -08:00
module.exports = (commandKeys, execCommand, showAbout) => {
return {
label: `${app.getName()}`,
submenu: [
{
label: 'About Hyper',
click() {
showAbout();
}
},
{
type: 'separator'
},
{
label: 'Preferences...',
2017-11-03 13:06:48 -08:00
accelerator: commandKeys['window:preferences'],
click() {
execCommand('window:preferences');
}
},
{
type: 'separator'
},
{
role: 'services',
submenu: []
},
{
type: 'separator'
},
{
role: 'hide'
},
{
role: 'hideothers'
},
{
role: 'unhide'
},
{
type: 'separator'
},
{
role: 'quit'
}
]
};
};