diff options
author | 2018-11-28 20:48:18 +0100 | |
---|---|---|
committer | 2018-11-28 20:48:18 +0100 | |
commit | 72d4164030bdf7c596a482b1a56b2afec94d181a (patch) | |
tree | b8d3507c1b5472ce4b512de3b96443167d1766b5 /src | |
parent | Add missing delayApp commit (diff) | |
download | ferdium-app-72d4164030bdf7c596a482b1a56b2afec94d181a.tar.gz ferdium-app-72d4164030bdf7c596a482b1a56b2afec94d181a.tar.zst ferdium-app-72d4164030bdf7c596a482b1a56b2afec94d181a.zip |
fix(App): App menu was not initialized on app launch. Resolving copy & paste issues for login.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Menu.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 76b0f28d5..9d7df551c 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -485,7 +485,9 @@ export default class FranzMenu { | |||
485 | this.stores = stores; | 485 | this.stores = stores; |
486 | this.actions = actions; | 486 | this.actions = actions; |
487 | 487 | ||
488 | autorun(this._build.bind(this)); | 488 | setTimeout(() => { |
489 | autorun(this._build.bind(this)); | ||
490 | }, 10); | ||
489 | } | 491 | } |
490 | 492 | ||
491 | rebuild() { | 493 | rebuild() { |
@@ -497,7 +499,6 @@ export default class FranzMenu { | |||
497 | } | 499 | } |
498 | 500 | ||
499 | _build() { | 501 | _build() { |
500 | // console.log(window.franz); | ||
501 | const serviceTpl = Object.assign([], this.serviceTpl); // need to clone object so we don't modify computed (cached) object | 502 | const serviceTpl = Object.assign([], this.serviceTpl); // need to clone object so we don't modify computed (cached) object |
502 | 503 | ||
503 | if (window.franz === undefined) { | 504 | if (window.franz === undefined) { |
@@ -521,6 +522,7 @@ export default class FranzMenu { | |||
521 | click: () => { | 522 | click: () => { |
522 | this.actions.service.openDevToolsForActiveService(); | 523 | this.actions.service.openDevToolsForActiveService(); |
523 | }, | 524 | }, |
525 | enabled: this.stores.user.isLoggedIn && this.stores.services.enabled.length > 0, | ||
524 | }); | 526 | }); |
525 | 527 | ||
526 | tpl[1].submenu.unshift({ | 528 | tpl[1].submenu.unshift({ |
@@ -559,6 +561,7 @@ export default class FranzMenu { | |||
559 | click: () => { | 561 | click: () => { |
560 | this.actions.ui.openSettings({ path: 'app' }); | 562 | this.actions.ui.openSettings({ path: 'app' }); |
561 | }, | 563 | }, |
564 | enabled: this.stores.user.isLoggedIn, | ||
562 | }, | 565 | }, |
563 | { | 566 | { |
564 | type: 'separator', | 567 | type: 'separator', |
@@ -640,6 +643,7 @@ export default class FranzMenu { | |||
640 | click: () => { | 643 | click: () => { |
641 | this.actions.ui.openSettings({ path: 'app' }); | 644 | this.actions.ui.openSettings({ path: 'app' }); |
642 | }, | 645 | }, |
646 | enabled: this.stores.user.isLoggedIn, | ||
643 | }, | 647 | }, |
644 | { | 648 | { |
645 | type: 'separator', | 649 | type: 'separator', |
@@ -661,6 +665,7 @@ export default class FranzMenu { | |||
661 | click: () => { | 665 | click: () => { |
662 | this.actions.ui.openSettings({ path: 'recipes' }); | 666 | this.actions.ui.openSettings({ path: 'recipes' }); |
663 | }, | 667 | }, |
668 | enabled: this.stores.user.isLoggedIn, | ||
664 | }, { | 669 | }, { |
665 | type: 'separator', | 670 | type: 'separator', |
666 | }); | 671 | }); |