diff options
author | 2019-07-31 17:08:29 +0200 | |
---|---|---|
committer | 2019-07-31 17:08:29 +0200 | |
commit | bd49d59008d64db13e3f37277ec873a3a464ef9e (patch) | |
tree | 7d4f4a943477e543abbcacd2ceb2ac0002054910 /src/lib | |
parent | Merge branch 'develop' into feature/todos (diff) | |
download | ferdium-app-bd49d59008d64db13e3f37277ec873a3a464ef9e.tar.gz ferdium-app-bd49d59008d64db13e3f37277ec873a3a464ef9e.tar.zst ferdium-app-bd49d59008d64db13e3f37277ec873a3a464ef9e.zip |
MVP for service <-> todos integration
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Menu.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 22d788918..9e491e151 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -96,6 +96,10 @@ const menuItems = defineMessages({ | |||
96 | id: 'menu.view.toggleDevTools', | 96 | id: 'menu.view.toggleDevTools', |
97 | defaultMessage: '!!!Toggle Developer Tools', | 97 | defaultMessage: '!!!Toggle Developer Tools', |
98 | }, | 98 | }, |
99 | toggleTodosDevTools: { | ||
100 | id: 'menu.view.toggleTodosDevTools', | ||
101 | defaultMessage: '!!!Toggle Todos Developer Tools', | ||
102 | }, | ||
99 | toggleServiceDevTools: { | 103 | toggleServiceDevTools: { |
100 | id: 'menu.view.toggleServiceDevTools', | 104 | id: 'menu.view.toggleServiceDevTools', |
101 | defaultMessage: '!!!Toggle Service Developer Tools', | 105 | defaultMessage: '!!!Toggle Service Developer Tools', |
@@ -240,6 +244,7 @@ const menuItems = defineMessages({ | |||
240 | id: 'menu.workspaces.defaultWorkspace', | 244 | id: 'menu.workspaces.defaultWorkspace', |
241 | defaultMessage: '!!!Default', | 245 | defaultMessage: '!!!Default', |
242 | }, | 246 | }, |
247 | |||
243 | }); | 248 | }); |
244 | 249 | ||
245 | function getActiveWebview() { | 250 | function getActiveWebview() { |
@@ -620,6 +625,17 @@ export default class FranzMenu { | |||
620 | enabled: this.stores.user.isLoggedIn && this.stores.services.enabled.length > 0, | 625 | enabled: this.stores.user.isLoggedIn && this.stores.services.enabled.length > 0, |
621 | }); | 626 | }); |
622 | 627 | ||
628 | if (this.stores.features.features.isTodosEnabled) { | ||
629 | tpl[1].submenu.push({ | ||
630 | label: intl.formatMessage(menuItems.toggleTodosDevTools), | ||
631 | accelerator: `${cmdKey}+Shift+Alt+O`, | ||
632 | click: () => { | ||
633 | const webview = document.querySelector('webview[partition="persist:todos"]'); | ||
634 | if (webview) webview.openDevTools(); | ||
635 | }, | ||
636 | }); | ||
637 | } | ||
638 | |||
623 | tpl[1].submenu.unshift({ | 639 | tpl[1].submenu.unshift({ |
624 | label: intl.formatMessage(menuItems.reloadService), | 640 | label: intl.formatMessage(menuItems.reloadService), |
625 | id: 'reloadService', // TODO: needed? | 641 | id: 'reloadService', // TODO: needed? |