Merge pull request #235 from geeeeeeeeek/issue/reload-app-for-debugging

Add 'Hard Reload' mode for debugging.
This commit is contained in:
Akash Nimare
2017-07-27 08:52:50 +00:00
committed by GitHub
2 changed files with 14 additions and 0 deletions

View File

@@ -207,6 +207,11 @@ app.on('ready', () => {
app.quit();
});
ipc.on('hard-reload', () => {
mainWindow.reload();
page.send('destroytray');
});
ipc.on('toggle-app', () => {
if (mainWindow.isVisible()) {
mainWindow.hide();

View File

@@ -59,6 +59,15 @@ const viewSubmenu = [
}
}
},
{
label: 'Hard Reload',
accelerator: 'CommandOrControl+Shift+R',
click(item, focusedWindow) {
if (focusedWindow) {
sendAction('hard-reload');
}
}
},
{
type: 'separator'
},