1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2024-12-31 19:17:44 +01:00

refs #377 Show some menus for mac only macOS

This commit is contained in:
AkiraFukushima 2018-07-21 00:29:04 +09:00
parent 368058ca80
commit 13d26c3bfb

View File

@ -91,6 +91,34 @@ function createWindow () {
}
}
})
/**
* For mac menu
*/
const macGeneralMenu = process.platform !== 'darwin' ? [] : [
{
type: 'separator'
},
{
label: 'Services',
role: 'services',
submenu: []
},
{
type: 'separator'
},
{
label: 'Hide Whalebird',
role: 'hide'
},
{
label: 'Hide Othres',
role: 'hideothers'
},
{
label: 'Show All',
role: 'unhide'
}
]
/**
* Set menu
*/
@ -120,29 +148,7 @@ function createWindow () {
mainWindow.webContents.send('open-preferences')
}
},
{
type: 'separator'
},
{
label: 'Services',
role: 'services',
submenu: []
},
{
type: 'separator'
},
{
label: 'Hide Whalebird',
role: 'hide'
},
{
label: 'Hide Othres',
role: 'hideothers'
},
{
label: 'Show All',
role: 'unhide'
},
...macGeneralMenu,
{
type: 'separator'
},