Skip to content

Commit 72d4164

Browse files
committed
fix(App): App menu was not initialized on app launch. Resolving copy & paste issues for login.
1 parent 217cb8c commit 72d4164

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎src/lib/Menu.js‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,9 @@ export default class FranzMenu {
485485
this.stores = stores;
486486
this.actions = actions;
487487

488-
autorun(this._build.bind(this));
488+
setTimeout(() => {
489+
autorun(this._build.bind(this));
490+
}, 10);
489491
}
490492

491493
rebuild() {
@@ -497,7 +499,6 @@ export default class FranzMenu {
497499
}
498500

499501
_build() {
500-
// console.log(window.franz);
501502
const serviceTpl = Object.assign([], this.serviceTpl); // need to clone object so we don't modify computed (cached) object
502503

503504
if (window.franz === undefined) {
@@ -521,6 +522,7 @@ export default class FranzMenu {
521522
click: () => {
522523
this.actions.service.openDevToolsForActiveService();
523524
},
525+
enabled: this.stores.user.isLoggedIn && this.stores.services.enabled.length > 0,
524526
});
525527

526528
tpl[1].submenu.unshift({
@@ -559,6 +561,7 @@ export default class FranzMenu {
559561
click: () => {
560562
this.actions.ui.openSettings({ path: 'app' });
561563
},
564+
enabled: this.stores.user.isLoggedIn,
562565
},
563566
{
564567
type: 'separator',
@@ -640,6 +643,7 @@ export default class FranzMenu {
640643
click: () => {
641644
this.actions.ui.openSettings({ path: 'app' });
642645
},
646+
enabled: this.stores.user.isLoggedIn,
643647
},
644648
{
645649
type: 'separator',
@@ -661,6 +665,7 @@ export default class FranzMenu {
661665
click: () => {
662666
this.actions.ui.openSettings({ path: 'recipes' });
663667
},
668+
enabled: this.stores.user.isLoggedIn,
664669
}, {
665670
type: 'separator',
666671
});

0 commit comments

Comments
 (0)