diff options
author | 2019-11-26 23:31:36 +0700 | |
---|---|---|
committer | 2019-11-26 23:31:36 +0700 | |
commit | 9214b63967ca659fb083d9c994842995aef126f6 (patch) | |
tree | 6ee2461c5eb730c96c22dbc473b36645dd84010e /src | |
parent | Enhance Settings readabiity (spacing) (diff) | |
download | ferdium-app-9214b63967ca659fb083d9c994842995aef126f6.tar.gz ferdium-app-9214b63967ca659fb083d9c994842995aef126f6.tar.zst ferdium-app-9214b63967ca659fb083d9c994842995aef126f6.zip |
#168 Set empty menu when Ferdi is locked
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Menu.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 826fe843f..d3b13e491 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -809,6 +809,7 @@ export default class FranzMenu { | |||
809 | locked: false, | 809 | locked: false, |
810 | }, | 810 | }, |
811 | }); | 811 | }); |
812 | window.ferdi.menu.rebuild() | ||
812 | setTimeout(() => { | 813 | setTimeout(() => { |
813 | actions.settings.update({ | 814 | actions.settings.update({ |
814 | type: 'app', | 815 | type: 'app', |
@@ -963,7 +964,8 @@ export default class FranzMenu { | |||
963 | 964 | ||
964 | this.currentTemplate = tpl; | 965 | this.currentTemplate = tpl; |
965 | const menu = Menu.buildFromTemplate(tpl); | 966 | const menu = Menu.buildFromTemplate(tpl); |
966 | Menu.setApplicationMenu(menu); | 967 | const lockedMenu = Menu.buildFromTemplate([]); |
968 | Menu.setApplicationMenu(this.stores.settings.app.locked ? lockedMenu : menu); | ||
967 | } | 969 | } |
968 | 970 | ||
969 | serviceTpl() { | 971 | serviceTpl() { |