1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

CU-hn5uqe: Tray menu options update + refactoring

This commit is contained in:
Andrew Simachev 2021-05-01 14:04:28 +03:00
parent d81f6393b4
commit 047c4064ba
2 changed files with 52 additions and 4 deletions

View file

@ -127,9 +127,57 @@ function initTray () {
tray.setToolTip('Anytype');
tray.setContextMenu(Menu.buildFromTemplate([
{
label: 'Show window',
label: 'Open Anytype',
click: () => { win.show(); }
},
{ type: 'separator' },
{
label: 'Settings',
click: () => {
win.show();
send('popup', 'settings');
}
},
{
label: 'Check for updates',
click: () => {
win.show();
checkUpdate(false);
}
},
{ type: 'separator' },
{
label: 'Import',
click: () => {
win.show();
send('popup', 'settings', { page: 'importIndex' });
}
},
{
label: 'Export',
click: () => {
win.show();
send('popup', 'settings', { page: 'exportMarkdown' });
}
},
{ type: 'separator' },
{
label: 'Object diagnostics',
click: () => {
win.show();
send('debugSync');
}
},
{ type: 'separator' },
{
label: 'Quit',
click: () => {
if (win) {
win.hide();
};
exit(false);
}
},
]));
};
@ -387,11 +435,11 @@ function menuInit () {
},
{
label: 'Import',
click: () => { send('import'); }
click: () => { send('popup', 'settings', { page: 'importIndex' }); }
},
{
label: 'Export',
click: () => { send('export'); }
click: () => { send('popup', 'settings', { page: 'exportMarkdown' }); }
},
{
label: 'Object diagnostics',