1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00

fix menu-template

This commit is contained in:
Dick Choi
2015-12-16 09:15:52 +09:00
parent 958469f526
commit 48f57376d3

View File

@@ -2,9 +2,8 @@ const electron = require('electron')
const BrowserWindow = electron.BrowserWindow
const shell = electron.shell
module.exports = [
{
label: 'Electron',
var boost = {
label: 'Boost',
submenu: [
{
label: 'About Boost',
@@ -43,8 +42,9 @@ module.exports = [
selector: 'terminate:'
}
]
},
{
}
var edit = {
label: 'Edit',
submenu: [
{
@@ -81,30 +81,35 @@ module.exports = [
selector: 'selectAll:'
}
]
},
{
}
var view = {
label: 'View',
submenu: [
{
label: 'Reload',
accelerator: 'Command+R',
accelerator: (function () {
if (process.platform === 'darwin') return 'Command+R'
else return 'Ctrl+R'
})(),
click: function () {
BrowserWindow.getFocusedWindow().reload()
}
},
{
label: 'Toggle Developer Tools',
accelerator: (function () {
if (process.platform === 'darwin') return 'Alt+Command+I'
else return 'Ctrl+Shift+I'
})(),
click: function (item, focusedWindow) {
if (focusedWindow) BrowserWindow.getFocusedWindow().toggleDevTools()
}
}
// {
// label: 'Toggle Developer Tools',
// accelerator: (function () {
// if (process.platform === 'darwin') return 'Alt+Command+I'
// else return 'Ctrl+Shift+I'
// })(),
// click: function (item, focusedWindow) {
// if (focusedWindow) BrowserWindow.getFocusedWindow().toggleDevTools()
// }
// }
]
},
{
}
var window = {
label: 'Window',
submenu: [
{
@@ -125,8 +130,9 @@ module.exports = [
selector: 'arrangeInFront:'
}
]
},
{
}
var help = {
label: 'Help',
role: 'help',
submenu: [
@@ -148,4 +154,7 @@ module.exports = [
}
]
}
]
module.exports = process.platform === 'darwin'
? [boost, edit, view, window, help]
: [view, help]