@@ -12,7 +12,7 @@ const BrowserWindow = electron.BrowserWindow
12
12
const IPC = require ( 'electron' ) . ipcMain ;
13
13
const { dialog } = require ( 'electron' ) ;
14
14
const Menu = electron . Menu ;
15
- // const openAboutWindow = require('about-window').default;
15
+ const openAboutWindow = require ( 'about-window' ) . default ;
16
16
17
17
// required node modules
18
18
const path = require ( 'path' ) ;
@@ -48,31 +48,31 @@ function createWindow() {
48
48
} ) )
49
49
50
50
// About React-Primer window in menu
51
- // const menu = Menu.buildFromTemplate([
52
- // {
53
- // label: 'React Primer',
54
- // submenu: [
55
- // {
56
- // label: 'About React Primer',
57
- // click: () => openAboutWindow({
58
- // icon_path: path.join(__dirname, './assets/icons/png/256x256.png'),
59
- // copyright: 'Copyright © 2017 React Primer. All Rights Reserved.',
60
- // homepage: 'http://react-primer.com/',
61
- // bug_report_url: 'https://github.com/ReactPrimer/ReactPrimer/issues',
62
- // description: "React Prototyping Tool"
63
- // })
64
- // },
65
- // {
66
- // label: 'Quit',
67
- // accelerator: 'CmdOrCtrl+Q',
68
- // click: () => {
69
- // app.quit();
70
- // }
71
- // },
72
- // ]
73
- // }
74
- // ]);
75
- // Menu.setApplicationMenu(menu);
51
+ const menu = Menu . buildFromTemplate ( [
52
+ {
53
+ label : 'React Primer' ,
54
+ submenu : [
55
+ {
56
+ label : 'About React Primer' ,
57
+ click : ( ) => openAboutWindow ( {
58
+ icon_path : path . join ( __dirname , './assets/icons/png/256x256.png' ) ,
59
+ copyright : 'Copyright © 2017 React Primer. All Rights Reserved.' ,
60
+ homepage : 'http://react-primer.com/' ,
61
+ bug_report_url : 'https://github.com/ReactPrimer/ReactPrimer/issues' ,
62
+ description : "React Prototyping Tool"
63
+ } )
64
+ } ,
65
+ {
66
+ label : 'Quit' ,
67
+ accelerator : 'CmdOrCtrl+Q' ,
68
+ click : ( ) => {
69
+ app . quit ( ) ;
70
+ }
71
+ } ,
72
+ ]
73
+ }
74
+ ] ) ;
75
+ Menu . setApplicationMenu ( menu ) ;
76
76
77
77
// Open the DevTools.
78
78
// mainWindow.webContents.openDevTools()
0 commit comments