Add isLoggedIn to Choo app state
This commit is contained in:
parent
496787263b
commit
6dab28e7a5
|
@ -59,6 +59,7 @@ app.use((state, emitter) => {
|
|||
state.currentView = 'home';
|
||||
state.language = app.getSettingsItem('lang') ? app.getSettingsItem('lang') : (navigator.language || navigator.userLanguage).split('-')[0];
|
||||
state.viewStates = {};
|
||||
state.isLoggedIn = false;
|
||||
}
|
||||
|
||||
// Listeners
|
||||
|
|
|
@ -12,4 +12,8 @@ export class ViewController {
|
|||
}
|
||||
this.state = this.appState.viewStates[viewName];
|
||||
}
|
||||
|
||||
get isLoggedIn () {
|
||||
return this.appState.isLoggedIn;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue