Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions lib/main-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const BrowserWindow = electron.BrowserWindow
const shell = electron.shell
const mainWindow = require('./main-window')

const OSX = process.platform === 'darwin'
const macOS = process.platform === 'darwin'
// const WIN = process.platform === 'win32'
const LINUX = process.platform === 'linux'

var boost = OSX
const boost = macOS
? {
label: 'Boostnote',
submenu: [
Expand Down Expand Up @@ -36,6 +36,7 @@ var boost = OSX
type: 'separator'
},
{
label: 'Quit Boostnote',
role: 'quit'
}
]
Expand All @@ -49,13 +50,13 @@ var boost = OSX
]
}

var file = {
const file = {
label: 'File',
submenu: [
{
label: 'New Note',
accelerator: 'CommandOrControl+N',
click: function () {
click () {
mainWindow.webContents.send('top:new-note')
}
},
Expand Down Expand Up @@ -93,8 +94,8 @@ var file = {
},
{
label: 'Delete Note',
accelerator: OSX ? 'Control+Backspace' : 'Control+Delete',
click: function () {
accelerator: macOS ? 'Control+Backspace' : 'Control+Delete',
click () {
mainWindow.webContents.send('detail:delete')
}
}
Expand All @@ -104,13 +105,12 @@ var file = {
if (LINUX) {
file.submenu.push({
type: 'separator'
})
file.submenu.push({
}, {
role: 'quit'
})
}

var edit = {
const edit = {
label: 'Edit',
submenu: [
{
Expand Down Expand Up @@ -149,20 +149,20 @@ var edit = {
]
}

var view = {
const view = {
label: 'View',
submenu: [
{
label: 'Reload',
accelerator: 'CommandOrControl+R',
click: function () {
click () {
BrowserWindow.getFocusedWindow().reload()
}
},
{
label: 'Toggle Developer Tools',
accelerator: OSX ? 'Command+Alt+I' : 'Control+Shift+I',
click: function () {
accelerator: macOS ? 'Command+Alt+I' : 'Control+Shift+I',
click () {
BrowserWindow.getFocusedWindow().toggleDevTools()
}
},
Expand Down Expand Up @@ -203,7 +203,7 @@ var view = {
]
}

var window = {
const window = {
label: 'Window',
submenu: [
{
Expand All @@ -226,21 +226,21 @@ var window = {
]
}

var help = {
const help = {
label: 'Help',
role: 'help',
submenu: [
{
label: 'Boostnote official site',
click: function () { shell.openExternal('https://boostnote.io/') }
click () { shell.openExternal('https://boostnote.io/') }
},
{
label: 'Issue Tracker',
click: function () { shell.openExternal('https://github.com/BoostIO/Boostnote/issues') }
click () { shell.openExternal('https://github.com/BoostIO/Boostnote/issues') }
},
{
label: 'Changelog',
click: function () { shell.openExternal('https://github.com/BoostIO/boost-releases') }
click () { shell.openExternal('https://github.com/BoostIO/boost-releases') }
}
]
}
Expand Down