Add "Check for Updates..." menu item

This commit is contained in:
Yuya Ochiai
2017-09-04 20:47:10 +09:00
parent d65bf81bd0
commit bccb8d26a6

View File

@@ -3,7 +3,7 @@
// See LICENSE.txt for license information.
'use strict';
import {app, dialog, Menu, shell} from 'electron';
import {app, dialog, ipcMain, Menu, shell} from 'electron';
import settings from '../../common/settings';
import buildConfig from '../../common/config/buildConfig';
@@ -230,6 +230,16 @@ function createTemplate(mainWindow, config, isDev) {
submenu.push({
label: `Version ${app.getVersion()}`,
enabled: false,
}, {
type: 'separator',
}, {
label: `Version ${app.getVersion()}`,
enabled: false,
}, {
label: 'Check for Updates...',
click() {
ipcMain.emit('check-for-updates');
},
});
template.push({label: '&Help', submenu});
return template;