diff options
Diffstat (limited to 'src/lib/Menu.js')
-rw-r--r-- | src/lib/Menu.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 8e529d859..38302b40b 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -591,7 +591,10 @@ class FranzMenu { | |||
591 | } | 591 | } |
592 | 592 | ||
593 | const { intl } = window['ferdi']; | 593 | const { intl } = window['ferdi']; |
594 | const tpl = _titleBarTemplateFactory(intl, this.stores.settings.app.locked); | 594 | const locked = this.stores.settings.app.locked |
595 | && this.stores.settings.app.lockingFeatureEnabled | ||
596 | && this.stores.user.isLoggedIn; | ||
597 | const tpl = _titleBarTemplateFactory(intl, locked); | ||
595 | const { actions } = this; | 598 | const { actions } = this; |
596 | 599 | ||
597 | if (!isMac) { | 600 | if (!isMac) { |
@@ -611,7 +614,7 @@ class FranzMenu { | |||
611 | }); | 614 | }); |
612 | } | 615 | } |
613 | 616 | ||
614 | if (!this.stores.settings.app.locked) { | 617 | if (!locked) { |
615 | tpl[1].submenu.push( | 618 | tpl[1].submenu.push( |
616 | { | 619 | { |
617 | type: 'separator', | 620 | type: 'separator', |
@@ -755,18 +758,18 @@ class FranzMenu { | |||
755 | this.actions.ui.openSettings({ path: 'app' }); | 758 | this.actions.ui.openSettings({ path: 'app' }); |
756 | }, | 759 | }, |
757 | enabled: this.stores.user.isLoggedIn, | 760 | enabled: this.stores.user.isLoggedIn, |
758 | visible: !this.stores.settings.app.locked, | 761 | visible: !locked, |
759 | }, | 762 | }, |
760 | { | 763 | { |
761 | label: intl.formatMessage(menuItems.checkForUpdates), | 764 | label: intl.formatMessage(menuItems.checkForUpdates), |
762 | visible: !this.stores.settings.app.locked, | 765 | visible: !locked, |
763 | click: () => { | 766 | click: () => { |
764 | this.actions.app.checkForUpdates(); | 767 | this.actions.app.checkForUpdates(); |
765 | }, | 768 | }, |
766 | }, | 769 | }, |
767 | { | 770 | { |
768 | type: 'separator', | 771 | type: 'separator', |
769 | visible: !this.stores.settings.app.locked, | 772 | visible: !locked, |
770 | }, | 773 | }, |
771 | { | 774 | { |
772 | label: intl.formatMessage(menuItems.services), | 775 | label: intl.formatMessage(menuItems.services), |
@@ -846,7 +849,7 @@ class FranzMenu { | |||
846 | this.actions.ui.openSettings({ path: 'app' }); | 849 | this.actions.ui.openSettings({ path: 'app' }); |
847 | }, | 850 | }, |
848 | enabled: this.stores.user.isLoggedIn, | 851 | enabled: this.stores.user.isLoggedIn, |
849 | visible: !this.stores.settings.locked, | 852 | visible: !locked, |
850 | }, | 853 | }, |
851 | { | 854 | { |
852 | type: 'separator', | 855 | type: 'separator', |
@@ -868,7 +871,7 @@ class FranzMenu { | |||
868 | ); | 871 | ); |
869 | } | 872 | } |
870 | 873 | ||
871 | if (!this.stores.settings.app.locked) { | 874 | if (!locked) { |
872 | if (serviceTpl.length > 0) { | 875 | if (serviceTpl.length > 0) { |
873 | tpl[3].submenu = serviceTpl; | 876 | tpl[3].submenu = serviceTpl; |
874 | } | 877 | } |