Skip to content

Commit

Permalink
fix(App): App menu was not initialized on app launch. Resolving copy …
Browse files Browse the repository at this point in the history
…& paste issues for login.
  • Loading branch information
adlk committed Nov 28, 2018
1 parent 217cb8c commit 72d4164
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,9 @@ export default class FranzMenu {
this.stores = stores;
this.actions = actions;

autorun(this._build.bind(this));
setTimeout(() => {
autorun(this._build.bind(this));
}, 10);
}

rebuild() {
Expand All @@ -497,7 +499,6 @@ export default class FranzMenu {
}

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

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

tpl[1].submenu.unshift({
Expand Down Expand Up @@ -559,6 +561,7 @@ export default class FranzMenu {
click: () => {
this.actions.ui.openSettings({ path: 'app' });
},
enabled: this.stores.user.isLoggedIn,
},
{
type: 'separator',
Expand Down Expand Up @@ -640,6 +643,7 @@ export default class FranzMenu {
click: () => {
this.actions.ui.openSettings({ path: 'app' });
},
enabled: this.stores.user.isLoggedIn,
},
{
type: 'separator',
Expand All @@ -661,6 +665,7 @@ export default class FranzMenu {
click: () => {
this.actions.ui.openSettings({ path: 'recipes' });
},
enabled: this.stores.user.isLoggedIn,
}, {
type: 'separator',
});
Expand Down

0 comments on commit 72d4164

Please sign in to comment.