mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-07 17:53:38 -08:00
Add application menu items to context menu (#208)
Co-authored-by: linonetwo <linonetwo012@gmail.com>
This commit is contained in:
parent
99f2bb0c10
commit
4c90522f73
1 changed files with 39 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ const {
|
|||
|
||||
const ContextMenuBuilder = require('../libs/context-menu-builder');
|
||||
|
||||
const { MenuItem } = remote;
|
||||
const { MenuItem, shell } = remote;
|
||||
|
||||
window.global = {};
|
||||
|
||||
|
|
@ -124,6 +124,44 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
},
|
||||
}));
|
||||
|
||||
menu.append(new MenuItem({ type: 'separator' }));
|
||||
|
||||
menu.append(
|
||||
new MenuItem({
|
||||
label: 'More',
|
||||
submenu: [
|
||||
{
|
||||
label: 'About',
|
||||
click: () => ipcRenderer.send('request-show-about-window'),
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: 'Check for Updates',
|
||||
click: () => ipcRenderer.send('request-check-for-updates'),
|
||||
},
|
||||
{
|
||||
label: 'Preferences...',
|
||||
click: () => ipcRenderer.send('request-show-preferences-window'),
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: 'Singlebox Support',
|
||||
click: () => shell.openExternal('https://atomery.com/support?app=singlebox'),
|
||||
},
|
||||
{
|
||||
label: 'Singlebox Website',
|
||||
click: () => shell.openExternal('https://singleboxapp.com'),
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: 'Quit',
|
||||
click: () => ipcRenderer.send('request-quit'),
|
||||
},
|
||||
],
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
menu.popup(remote.getCurrentWindow());
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue