From 67b97a09382e9afbe78f3c64add24bd3440da908 Mon Sep 17 00:00:00 2001 From: kytwb Date: Sat, 18 Dec 2021 14:38:57 +0100 Subject: Move LockedScreen to AppLayout --- src/lib/Menu.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/lib/Menu.js') 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 { } const { intl } = window['ferdi']; - const tpl = _titleBarTemplateFactory(intl, this.stores.settings.app.locked); + const locked = this.stores.settings.app.locked + && this.stores.settings.app.lockingFeatureEnabled + && this.stores.user.isLoggedIn; + const tpl = _titleBarTemplateFactory(intl, locked); const { actions } = this; if (!isMac) { @@ -611,7 +614,7 @@ class FranzMenu { }); } - if (!this.stores.settings.app.locked) { + if (!locked) { tpl[1].submenu.push( { type: 'separator', @@ -755,18 +758,18 @@ class FranzMenu { this.actions.ui.openSettings({ path: 'app' }); }, enabled: this.stores.user.isLoggedIn, - visible: !this.stores.settings.app.locked, + visible: !locked, }, { label: intl.formatMessage(menuItems.checkForUpdates), - visible: !this.stores.settings.app.locked, + visible: !locked, click: () => { this.actions.app.checkForUpdates(); }, }, { type: 'separator', - visible: !this.stores.settings.app.locked, + visible: !locked, }, { label: intl.formatMessage(menuItems.services), @@ -846,7 +849,7 @@ class FranzMenu { this.actions.ui.openSettings({ path: 'app' }); }, enabled: this.stores.user.isLoggedIn, - visible: !this.stores.settings.locked, + visible: !locked, }, { type: 'separator', @@ -868,7 +871,7 @@ class FranzMenu { ); } - if (!this.stores.settings.app.locked) { + if (!locked) { if (serviceTpl.length > 0) { tpl[3].submenu = serviceTpl; } -- cgit v1.2.3-70-g09d2