diff --git a/bnd2/electron/main.js b/bnd2/electron/main.js index b32c9577be6f3a474b572d0627dcceed752cd32b..23dafc87dff91620ccd4b7e1f2f3c4ed54afa944 100644 --- a/bnd2/electron/main.js +++ b/bnd2/electron/main.js @@ -35,11 +35,28 @@ const createWindow = () => { } const createMenu = () => { - if (isDev()) { - return - } - - Menu.setApplicationMenu(null) + const template = [ + { + label: 'View', + submenu: [ + { + label: 'About BND2', + click () { + require('electron'). + shell. + openExternal('https://github.com/b3log/baidu-netdisk-downloaderx') + }, + }, + {type: 'separator'}, + {role: 'toggledevtools'}, + {role: 'togglefullscreen'}, + {type: 'separator'}, + {role: 'quit'}, + ], + }, + ] + const menu = Menu.buildFromTemplate(template) + Menu.setApplicationMenu(menu) } // This method will be called when Electron has finished