mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
fix menu-template
This commit is contained in:
@@ -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: [
|
||||
@@ -147,5 +153,8 @@ module.exports = [
|
||||
click: function () { shell.openExternal('https://github.com/BoostIO/boost-releases/blob/master/changelog.md') }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
module.exports = process.platform === 'darwin'
|
||||
? [boost, edit, view, window, help]
|
||||
: [view, help]
|
||||
|
||||
Reference in New Issue
Block a user