Commit 93d7cfcb authored by Luke Schoen's avatar Luke Schoen Committed by Thibaut Sardan
Browse files

feat: Add Reload to taskbar menu in development only (#468)

* feat: Add Reload to taskbar menu in development only

* review-fix: Change to const
parent c856d12a
Pipeline #33335 passed with stages
in 8 minutes and 54 seconds
......@@ -116,7 +116,7 @@ const getMenubarMenuTemplate = fetherApp => {
]
};
let template = [
const template = [
fileTab,
process.platform === 'darwin' ? editTabMacOS : editTab,
process.platform === 'win32' ? viewTabWindowsOS : viewTab,
......@@ -167,16 +167,24 @@ const getContextTrayMenuTemplate = fetherApp => {
fetherApp.win.focus();
}
}
},
{ label: 'Quit', role: 'quit' }
}
];
if (process.env.NODE_ENV !== 'production') {
template.push({
label: 'Reload',
click: () => fetherApp.win.webContents.reload()
});
}
template.push({ label: 'Quit', role: 'quit' });
return template;
}
};
const getContextWindowMenuTemplate = fetherApp => {
let template = getMenubarMenuTemplate(fetherApp);
const template = getMenubarMenuTemplate(fetherApp);
if (fetherApp.options.withTaskbar) {
// Remove File and Help menus in taskbar mode for window context menu
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment