Footer state

This commit is contained in:
Mo Bitar
2020-02-17 18:45:21 -06:00
parent c6198a4612
commit fc88ab9b2b
5 changed files with 39 additions and 27 deletions

View File

@@ -111,9 +111,13 @@ class FooterCtrl extends PureCtrl {
/** @override */
onAppEvent(eventName) {
if (eventName === ApplicationEvents.EnteredOutOfSync) {
this.outOfSync = true;
this.setState({
outOfSync: true
});
} else if (eventName === ApplicationEvents.ExitedOutOfSync) {
this.outOfSync = false;
this.setState({
outOfSync: false
});
} else if (eventName === ApplicationEvents.CompletedSync) {
if (this.offline && this.application.getNoteCount() === 0) {
this.showAccountMenu = true;

View File

@@ -52,9 +52,7 @@ class AccountMenuCtrl extends PureCtrl {
user: this.application.getUser(),
formData: {
mergeLocal: true,
ephemeral: false,
email: "b@bitar.io",
user_password: "password"
ephemeral: false
},
mutable: {}
};

View File

@@ -55,9 +55,9 @@
| Last refreshed {{ctrl.lastSyncDate}}
.sk-app-bar-item(
ng-click='ctrl.toggleSyncResolutionMenu()',
ng-if='(ctrl.outOfSync && !ctrl.isRefreshing) || ctrl.showSyncResolution'
ng-if='(ctrl.state.outOfSync && !ctrl.isRefreshing) || ctrl.showSyncResolution'
)
.sk-label.warning(ng-if='ctrl.outOfSync') Potentially Out of Sync
.sk-label.warning(ng-if='ctrl.state.outOfSync') Potentially Out of Sync
sync-resolution-menu(
close-function='ctrl.toggleSyncResolutionMenu',
ng-click='$event.stopPropagation();',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long