@@ -3,11 +3,11 @@ const BrowserWindow = electron.BrowserWindow
33const shell = electron . shell
44const mainWindow = require ( './main-window' )
55
6- const OSX = process . platform === 'darwin'
6+ const macOS = process . platform === 'darwin'
77// const WIN = process.platform === 'win32'
88const LINUX = process . platform === 'linux'
99
10- var boost = OSX
10+ const boost = macOS
1111 ? {
1212 label : 'Boostnote' ,
1313 submenu : [
@@ -36,6 +36,7 @@ var boost = OSX
3636 type : 'separator'
3737 } ,
3838 {
39+ label : 'Quit Boostnote' ,
3940 role : 'quit'
4041 }
4142 ]
@@ -49,13 +50,13 @@ var boost = OSX
4950 ]
5051 }
5152
52- var file = {
53+ const file = {
5354 label : 'File' ,
5455 submenu : [
5556 {
5657 label : 'New Note' ,
5758 accelerator : 'CommandOrControl+N' ,
58- click : function ( ) {
59+ click ( ) {
5960 mainWindow . webContents . send ( 'top:new-note' )
6061 }
6162 } ,
@@ -93,8 +94,8 @@ var file = {
9394 } ,
9495 {
9596 label : 'Delete Note' ,
96- accelerator : OSX ? 'Control+Backspace' : 'Control+Delete' ,
97- click : function ( ) {
97+ accelerator : macOS ? 'Control+Backspace' : 'Control+Delete' ,
98+ click ( ) {
9899 mainWindow . webContents . send ( 'detail:delete' )
99100 }
100101 }
@@ -104,13 +105,12 @@ var file = {
104105if ( LINUX ) {
105106 file . submenu . push ( {
106107 type : 'separator'
107- } )
108- file . submenu . push ( {
108+ } , {
109109 role : 'quit'
110110 } )
111111}
112112
113- var edit = {
113+ const edit = {
114114 label : 'Edit' ,
115115 submenu : [
116116 {
@@ -149,20 +149,20 @@ var edit = {
149149 ]
150150}
151151
152- var view = {
152+ const view = {
153153 label : 'View' ,
154154 submenu : [
155155 {
156156 label : 'Reload' ,
157157 accelerator : 'CommandOrControl+R' ,
158- click : function ( ) {
158+ click ( ) {
159159 BrowserWindow . getFocusedWindow ( ) . reload ( )
160160 }
161161 } ,
162162 {
163163 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 ( ) {
166166 BrowserWindow . getFocusedWindow ( ) . toggleDevTools ( )
167167 }
168168 } ,
@@ -203,7 +203,7 @@ var view = {
203203 ]
204204}
205205
206- var window = {
206+ const window = {
207207 label : 'Window' ,
208208 submenu : [
209209 {
@@ -226,21 +226,21 @@ var window = {
226226 ]
227227}
228228
229- var help = {
229+ const help = {
230230 label : 'Help' ,
231231 role : 'help' ,
232232 submenu : [
233233 {
234234 label : 'Boostnote official site' ,
235- click : function ( ) { shell . openExternal ( 'https://boostnote.io/' ) }
235+ click ( ) { shell . openExternal ( 'https://boostnote.io/' ) }
236236 } ,
237237 {
238238 label : 'Issue Tracker' ,
239- click : function ( ) { shell . openExternal ( 'https://github.com/BoostIO/Boostnote/issues' ) }
239+ click ( ) { shell . openExternal ( 'https://github.com/BoostIO/Boostnote/issues' ) }
240240 } ,
241241 {
242242 label : 'Changelog' ,
243- click : function ( ) { shell . openExternal ( 'https://github.com/BoostIO/boost-releases' ) }
243+ click ( ) { shell . openExternal ( 'https://github.com/BoostIO/boost-releases' ) }
244244 }
245245 ]
246246}
0 commit comments