@@ -3,11 +3,11 @@ const BrowserWindow = electron.BrowserWindow
3
3
const shell = electron . shell
4
4
const mainWindow = require ( './main-window' )
5
5
6
- const OSX = process . platform === 'darwin'
6
+ const macOS = process . platform === 'darwin'
7
7
// const WIN = process.platform === 'win32'
8
8
const LINUX = process . platform === 'linux'
9
9
10
- var boost = OSX
10
+ const boost = macOS
11
11
? {
12
12
label : 'Boostnote' ,
13
13
submenu : [
@@ -36,6 +36,7 @@ var boost = OSX
36
36
type : 'separator'
37
37
} ,
38
38
{
39
+ label : 'Quit Boostnote' ,
39
40
role : 'quit'
40
41
}
41
42
]
@@ -49,13 +50,13 @@ var boost = OSX
49
50
]
50
51
}
51
52
52
- var file = {
53
+ const file = {
53
54
label : 'File' ,
54
55
submenu : [
55
56
{
56
57
label : 'New Note' ,
57
58
accelerator : 'CommandOrControl+N' ,
58
- click : function ( ) {
59
+ click ( ) {
59
60
mainWindow . webContents . send ( 'top:new-note' )
60
61
}
61
62
} ,
@@ -93,8 +94,8 @@ var file = {
93
94
} ,
94
95
{
95
96
label : 'Delete Note' ,
96
- accelerator : OSX ? 'Control+Backspace' : 'Control+Delete' ,
97
- click : function ( ) {
97
+ accelerator : macOS ? 'Control+Backspace' : 'Control+Delete' ,
98
+ click ( ) {
98
99
mainWindow . webContents . send ( 'detail:delete' )
99
100
}
100
101
}
@@ -104,13 +105,12 @@ var file = {
104
105
if ( LINUX ) {
105
106
file . submenu . push ( {
106
107
type : 'separator'
107
- } )
108
- file . submenu . push ( {
108
+ } , {
109
109
role : 'quit'
110
110
} )
111
111
}
112
112
113
- var edit = {
113
+ const edit = {
114
114
label : 'Edit' ,
115
115
submenu : [
116
116
{
@@ -149,20 +149,20 @@ var edit = {
149
149
]
150
150
}
151
151
152
- var view = {
152
+ const view = {
153
153
label : 'View' ,
154
154
submenu : [
155
155
{
156
156
label : 'Reload' ,
157
157
accelerator : 'CommandOrControl+R' ,
158
- click : function ( ) {
158
+ click ( ) {
159
159
BrowserWindow . getFocusedWindow ( ) . reload ( )
160
160
}
161
161
} ,
162
162
{
163
163
label : 'Toggle Developer Tools' ,
164
- accelerator : OSX ? 'Command+Alt+I' : 'Control+Shift+I' ,
165
- click : function ( ) {
164
+ accelerator : macOS ? 'Command+Alt+I' : 'Control+Shift+I' ,
165
+ click ( ) {
166
166
BrowserWindow . getFocusedWindow ( ) . toggleDevTools ( )
167
167
}
168
168
} ,
@@ -203,7 +203,7 @@ var view = {
203
203
]
204
204
}
205
205
206
- var window = {
206
+ const window = {
207
207
label : 'Window' ,
208
208
submenu : [
209
209
{
@@ -226,21 +226,21 @@ var window = {
226
226
]
227
227
}
228
228
229
- var help = {
229
+ const help = {
230
230
label : 'Help' ,
231
231
role : 'help' ,
232
232
submenu : [
233
233
{
234
234
label : 'Boostnote official site' ,
235
- click : function ( ) { shell . openExternal ( 'https://boostnote.io/' ) }
235
+ click ( ) { shell . openExternal ( 'https://boostnote.io/' ) }
236
236
} ,
237
237
{
238
238
label : 'Issue Tracker' ,
239
- click : function ( ) { shell . openExternal ( 'https://github.com/BoostIO/Boostnote/issues' ) }
239
+ click ( ) { shell . openExternal ( 'https://github.com/BoostIO/Boostnote/issues' ) }
240
240
} ,
241
241
{
242
242
label : 'Changelog' ,
243
- click : function ( ) { shell . openExternal ( 'https://github.com/BoostIO/boost-releases' ) }
243
+ click ( ) { shell . openExternal ( 'https://github.com/BoostIO/boost-releases' ) }
244
244
}
245
245
]
246
246
}
0 commit comments