mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 05:38:41 -09:00
menu: implement plugin updating in menu
This commit is contained in:
parent
c693a46896
commit
c97b67b4c8
1 changed files with 13 additions and 1 deletions
14
menu.js
14
menu.js
|
|
@ -7,7 +7,7 @@ const appName = app.getName();
|
||||||
// https://github.com/sindresorhus/anatine/blob/master/menu.js
|
// https://github.com/sindresorhus/anatine/blob/master/menu.js
|
||||||
|
|
||||||
|
|
||||||
module.exports = function createMenu ({ createWindow }) {
|
module.exports = function createMenu ({ createWindow, updatePlugins }) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: 'Application',
|
label: 'Application',
|
||||||
|
|
@ -152,6 +152,18 @@ module.exports = function createMenu ({ createWindow }) {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Tools',
|
||||||
|
submenu: [
|
||||||
|
{
|
||||||
|
label: 'Update plugins',
|
||||||
|
accelerator: 'CmdOrCtrl+U',
|
||||||
|
click (item, focusedWindow) {
|
||||||
|
updatePlugins();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'Window',
|
label: 'Window',
|
||||||
submenu: [
|
submenu: [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue