From ef8eebc8d0fcffefa5c306e0dcada3444b3e5a7e Mon Sep 17 00:00:00 2001 From: Yuya Ochiai Date: Mon, 21 Mar 2016 01:23:36 +0900 Subject: [PATCH] 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. --- src/main/menus/app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/menus/app.js b/src/main/menus/app.js index e56dec54..95ca1b87 100644 --- a/src/main/menus/app.js +++ b/src/main/menus/app.js @@ -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) {