summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2020-04-17 15:24:37 +0200
committerOskar Nyberg <oskar@mullvad.net>2020-04-21 07:39:24 +0200
commita3098eb2270106829e384891701f27b6c84c3d8e (patch)
tree593c466bec94113d790c3ecdc2000be36ade102e
parent54811af85a1e862326e8c4e1a4a4057149639d95 (diff)
downloadmullvadvpn-a3098eb2270106829e384891701f27b6c84c3d8e.tar.xz
mullvadvpn-a3098eb2270106829e384891701f27b6c84c3d8e.zip
Add reload and force reload to macOS application menu in dev mode
-rw-r--r--gui/src/main/index.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index 7b63b11a28..61b689456c 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -1329,10 +1329,15 @@ class ApplicationMain {
// On macOS, hotkeys are bound to the app menu and won't work if it's not set,
// even though the app menu itself is not visible because the app does not appear in the dock.
private setMacOsAppMenu() {
+ const mullvadVpnSubmenu: Electron.MenuItemConstructorOptions[] = [{ role: 'quit' }];
+ if (process.env.NODE_ENV === 'development') {
+ mullvadVpnSubmenu.unshift({ role: 'reload' }, { role: 'forceReload' });
+ }
+
const template: Electron.MenuItemConstructorOptions[] = [
{
label: 'Mullvad VPN',
- submenu: [{ role: 'quit' }],
+ submenu: mullvadVpnSubmenu,
},
{
label: 'Edit',