label: 'Electron',
submenu: [
{
- label: 'About Electron',
role: 'about'
},
{
type: 'separator'
},
{
- label: 'Services',
role: 'services',
submenu: []
},
type: 'separator'
},
{
- label: 'Hide Electron',
- accelerator: 'Command+H',
role: 'hide'
},
{
- label: 'Hide Others',
- accelerator: 'Command+Alt+H',
role: 'hideothers'
},
{
- label: 'Show All',
role: 'unhide'
},
{
type: 'separator'
},
{
- label: 'Quit ' + app.getName(),
- accelerator: 'Command+Q',
role: 'quit'
}
]
})
template[3].submenu = [
{
- label: 'Close',
- accelerator: 'CmdOrCtrl+W',
role: 'close'
},
{
- label: 'Minimize',
- accelerator: 'CmdOrCtrl+M',
role: 'minimize'
},
{
- label: 'Zoom',
role: 'zoom'
},
{
type: 'separator'
},
{
- label: 'Bring All to Front',
role: 'front'
}
]
label: 'File',
submenu: [
{
- label: 'Exit',
role: 'quit'
}
]
},
window: {
label: 'Window'
+ },
+ services: {
+ label: 'Services'
+ },
+ zoom: {
+ label: 'Zoom'
+ },
+ front: {
+ label: 'Bring All to Front'
+ },
+ about: {
+ get label () {
+ const {app} = require('electron')
+ return `About ${app.getName()}`
+ }
+ },
+ hide: {
+ get label () {
+ const {app} = require('electron')
+ return return `Hide ${app.getName()}`
+ },
+ accelerator: 'Command+H'
+ },
+ hideothers: {
+ label: 'Hide Others',
+ accelerator: 'Command+Alt+H'
+ },
+ unhide: {
+ label: 'Show All'
}
}