diff options
author | 2019-03-26 13:47:54 +0100 | |
---|---|---|
committer | 2019-03-26 13:47:54 +0100 | |
commit | d05a8efffadd926165d516d6efd8c8b893648ebe (patch) | |
tree | c96d3ad7e111c50ffd9054f8728ce204460e2948 /src/lib | |
parent | reset api requests when workspace feature is stopped (diff) | |
download | ferdium-app-d05a8efffadd926165d516d6efd8c8b893648ebe.tar.gz ferdium-app-d05a8efffadd926165d516d6efd8c8b893648ebe.tar.zst ferdium-app-d05a8efffadd926165d516d6efd8c8b893648ebe.zip |
hide workspace feature if it is disabled
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Menu.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 3435e04f7..3d6b6c824 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -322,6 +322,7 @@ const _templateFactory = intl => [ | |||
322 | { | 322 | { |
323 | label: intl.formatMessage(menuItems.workspaces), | 323 | label: intl.formatMessage(menuItems.workspaces), |
324 | submenu: [], | 324 | submenu: [], |
325 | visible: workspaceStore.isFeatureActive, | ||
325 | }, | 326 | }, |
326 | { | 327 | { |
327 | label: intl.formatMessage(menuItems.window), | 328 | label: intl.formatMessage(menuItems.window), |
@@ -563,7 +564,6 @@ export default class FranzMenu { | |||
563 | _build() { | 564 | _build() { |
564 | // need to clone object so we don't modify computed (cached) object | 565 | // need to clone object so we don't modify computed (cached) object |
565 | const serviceTpl = Object.assign([], this.serviceTpl()); | 566 | const serviceTpl = Object.assign([], this.serviceTpl()); |
566 | const workspacesMenu = Object.assign([], this.workspacesMenu()); | ||
567 | 567 | ||
568 | if (window.franz === undefined) { | 568 | if (window.franz === undefined) { |
569 | return; | 569 | return; |
@@ -731,7 +731,9 @@ export default class FranzMenu { | |||
731 | tpl[3].submenu = serviceTpl; | 731 | tpl[3].submenu = serviceTpl; |
732 | } | 732 | } |
733 | 733 | ||
734 | tpl[4].submenu = workspacesMenu; | 734 | if (workspaceStore.isFeatureActive) { |
735 | tpl[4].submenu = this.workspacesMenu(); | ||
736 | } | ||
735 | 737 | ||
736 | this.currentTemplate = tpl; | 738 | this.currentTemplate = tpl; |
737 | const menu = Menu.buildFromTemplate(tpl); | 739 | const menu = Menu.buildFromTemplate(tpl); |