launcher: context-menu: add app relaunch item (#182)
This commit is contained in:
parent
5fa74fae8c
commit
a4eba3fcd9
2 changed files with 11 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
var {remote, ipcRenderer, shell} = require('electron'),
|
||||
{dialog, webContents, Menu, MenuItem} = remote.require('electron'),
|
||||
{dialog, webContents, Menu, MenuItem, app} = remote.require('electron'),
|
||||
menu = new Menu(),
|
||||
settings = remote.require('./main/settings'),
|
||||
packageInfos = remote.require('./package.json')
|
||||
|
|
@ -231,6 +231,15 @@ $(document).ready(()=>{
|
|||
}
|
||||
})
|
||||
]}))
|
||||
menu.append(new MenuItem({type: 'submenu' , label: 'App', submenu: [
|
||||
new MenuItem({
|
||||
label: 'Relaunch',
|
||||
click: ()=>{
|
||||
app.relaunch()
|
||||
app.exit(0)
|
||||
}
|
||||
}),
|
||||
]}))
|
||||
|
||||
|
||||
window.addEventListener('contextmenu', function (e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue