mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 20:38:41 -09:00
28 lines
628 B
TypeScript
28 lines
628 B
TypeScript
import {BrowserWindow, MenuItemConstructorOptions} from 'electron';
|
|
|
|
export default (
|
|
commands: Record<string, string>,
|
|
execCommand: (command: string, focusedWindow?: BrowserWindow) => void
|
|
): MenuItemConstructorOptions => {
|
|
return {
|
|
label: 'Plugins',
|
|
submenu: [
|
|
{
|
|
label: 'Update',
|
|
accelerator: commands['plugins:update'],
|
|
click() {
|
|
execCommand('plugins:update');
|
|
}
|
|
},
|
|
{
|
|
label: 'Install Hyper CLI command in PATH',
|
|
click() {
|
|
execCommand('cli:install');
|
|
}
|
|
},
|
|
{
|
|
type: 'separator'
|
|
}
|
|
]
|
|
};
|
|
};
|