Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
feat: Add Reload to taskbar menu in development only (#468)
Browse files Browse the repository at this point in the history
* feat: Add Reload to taskbar menu in development only

* review-fix: Change to const
  • Loading branch information
ltfschoen authored and Tbaut committed Mar 20, 2019
1 parent c856d12 commit 93d7cfc
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions packages/fether-electron/src/main/app/menu/template/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const getMenubarMenuTemplate = fetherApp => {
]
};

let template = [
const template = [
fileTab,
process.platform === 'darwin' ? editTabMacOS : editTab,
process.platform === 'win32' ? viewTabWindowsOS : viewTab,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 93d7cfc

Please sign in to comment.