diff options
author | 2017-10-27 13:41:54 +0200 | |
---|---|---|
committer | 2017-10-27 13:41:54 +0200 | |
commit | e8da383d440445f7c28165e073d78c36b86b8b32 (patch) | |
tree | cc23f1378a8eed5caaea960b7a1e7b76ca4054c4 /src/lib | |
parent | fix(Shortcuts): Flip shortcut to navigate to next/previous service (diff) | |
download | ferdium-app-e8da383d440445f7c28165e073d78c36b86b8b32.tar.gz ferdium-app-e8da383d440445f7c28165e073d78c36b86b8b32.tar.zst ferdium-app-e8da383d440445f7c28165e073d78c36b86b8b32.zip |
feat(Menu): Add menu item to toggle (service) dev tools
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Menu.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index a6cde4d36..37f3dd45d 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -1,7 +1,7 @@ | |||
1 | import { remote, shell } from 'electron'; | 1 | import { remote, shell } from 'electron'; |
2 | import { autorun, computed, observable, toJS } from 'mobx'; | 2 | import { autorun, computed, observable, toJS } from 'mobx'; |
3 | 3 | ||
4 | import { isDevMode, isMac } from '../environment'; | 4 | import { isMac } from '../environment'; |
5 | 5 | ||
6 | const { app, Menu } = remote; | 6 | const { app, Menu } = remote; |
7 | 7 | ||
@@ -101,17 +101,15 @@ export default class FranzMenu { | |||
101 | _build() { | 101 | _build() { |
102 | const tpl = toJS(this.tpl); | 102 | const tpl = toJS(this.tpl); |
103 | 103 | ||
104 | if (isDevMode) { | 104 | tpl[1].submenu.push({ |
105 | tpl[1].submenu.push({ | 105 | role: 'toggledevtools', |
106 | role: 'toggledevtools', | 106 | }, { |
107 | }, { | 107 | label: 'Toggle Service Developer Tools', |
108 | label: 'Toggle Service Developer Tools', | 108 | accelerator: 'CmdOrCtrl+Shift+Alt+i', |
109 | accelerator: 'CmdOrCtrl+Shift+Alt+i', | 109 | click: () => { |
110 | click: () => { | 110 | this.actions.service.openDevToolsForActiveService(); |
111 | this.actions.service.openDevToolsForActiveService(); | 111 | }, |
112 | }, | 112 | }); |
113 | }); | ||
114 | } | ||
115 | 113 | ||
116 | tpl[1].submenu.unshift({ | 114 | tpl[1].submenu.unshift({ |
117 | label: 'Reload Service', | 115 | label: 'Reload Service', |