aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorLibravatar kytwb <kytwb@pm.me>2021-12-18 14:38:57 +0100
committerLibravatar kytwb <kytwb@pm.me>2021-12-18 14:38:57 +0100
commit67b97a09382e9afbe78f3c64add24bd3440da908 (patch)
tree53f1614e1d6e13758c7e279228be9108ae65c0ef /src/lib
parentRemove duplicate edit button in account settings tab (diff)
downloadferdium-app-67b97a09382e9afbe78f3c64add24bd3440da908.tar.gz
ferdium-app-67b97a09382e9afbe78f3c64add24bd3440da908.tar.zst
ferdium-app-67b97a09382e9afbe78f3c64add24bd3440da908.zip
Move LockedScreen to AppLayout
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Menu.js17
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 }