aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Amine Mouafik <amine@mouafik.fr>2020-02-27 16:08:30 +0100
committerLibravatar Amine Mouafik <amine@mouafik.fr>2020-02-27 16:08:30 +0100
commitef2dae888567bd661d500f5a492a7a1df66c4021 (patch)
treee0ebde30366f04c9e052568289fadf1f647f3459
parentConditionally display Menu items based on lock state (diff)
downloadferdium-app-ef2dae888567bd661d500f5a492a7a1df66c4021.tar.gz
ferdium-app-ef2dae888567bd661d500f5a492a7a1df66c4021.tar.zst
ferdium-app-ef2dae888567bd661d500f5a492a7a1df66c4021.zip
Do not include debug menu items when locked
It has to stay here, can't include it in the previous similar condition block without breaking things with the current implementation.
-rw-r--r--src/lib/Menu.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js
index cd2ebaef5..56276ce2d 100644
--- a/src/lib/Menu.js
+++ b/src/lib/Menu.js
@@ -983,10 +983,11 @@ export default class FranzMenu {
983 tpl[5].submenu = this.todosMenu(); 983 tpl[5].submenu = this.todosMenu();
984 } 984 }
985 985
986 tpl[tpl.length - 1].submenu.push({ 986 if (!this.stores.settings.app.locked) {
987 type: 'separator', 987 tpl[tpl.length - 1].submenu.push({
988 }, ...this.debugMenu()); 988 type: 'separator',
989 989 }, ...this.debugMenu());
990 }
990 this.currentTemplate = tpl; 991 this.currentTemplate = tpl;
991 const menu = Menu.buildFromTemplate(tpl); 992 const menu = Menu.buildFromTemplate(tpl);
992 Menu.setApplicationMenu(menu); 993 Menu.setApplicationMenu(menu);