Add "About" dialog for Windows and Linux

Close #63
In `src/main/menus/app.js`, 'about' role is supported on OS X only.
So need to implement the dialog.
This commit is contained in:
Yuya Ochiai
2016-03-21 01:23:36 +09:00
parent 60a2b0c770
commit ef8eebc8d0

View File

@@ -29,7 +29,13 @@ var createTemplate = function(mainWindow) {
label: first_menu_name,
submenu: [{
label: 'About ' + app_name,
role: 'about'
role: 'about',
click: function(item, focusedWindow) {
electron.dialog.showMessageBox(mainWindow, {
buttons: ["OK"],
message: `${app_name} Desktop ${electron.app.getVersion()}`
});
}
}, {
label: 'Settings',
click: function(item, focusedWindow) {