Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
app.relaunch();
app.quit();
}
},
{
label: 'Delete App Data',
click() {
shell.moveItemToTrash(app.getPath('userData'));
app.relaunch();
app.quit();
}
}
];
const macosTemplate: MenuItemConstructorOptions[] = [
appMenu([
{
label: 'Caprine Preferences',
submenu: preferencesSubmenu
},
{
label: 'Messenger Preferences…',
accelerator: 'Command+,',
click() {
sendAction('show-preferences');
}
},
{
type: 'separator'
},
...switchItems
]),
export function updateMenu(): void {
const template: MenuItemConstructorOptions[] = [
appMenu(),
{
label: 'Accounts',
submenu: [
...generateAccountsMenuItems(),
{
type: 'separator'
},
{
label: 'Add Account',
click: () => {
createAddAccountWindow()
}
}
]
},
{
openFileItem,
exportHistoryItem,
{
type: 'separator'
},
preferencesItem,
{
type: 'separator'
},
{
role: 'quit',
accelerator: 'Command+Q'
}
];
const appMenuItem = appMenu([preferencesItem]);
appMenuItem.submenu[0] = aboutItem;
const applicationMenuTemplate = [
appMenuItem,
{
role: 'fileMenu',
submenu: [
openFileItem,
{
type: 'separator'
},
{
label: 'Save Original…',
id: 'saveOriginal',
accelerator: 'Command+S',