Reset modes on login/logout
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
3c4d12c176
commit
4b3f484a89
@ -452,7 +452,8 @@
|
|||||||
observers: [
|
observers: [
|
||||||
"widthChanged(calcWidth)",
|
"widthChanged(calcWidth)",
|
||||||
"modeChanged(mode)",
|
"modeChanged(mode)",
|
||||||
"dateChanged(date)"
|
"dateChanged(date)",
|
||||||
|
"userChanged(user)"
|
||||||
],
|
],
|
||||||
|
|
||||||
disableLogin: function(username, password) {
|
disableLogin: function(username, password) {
|
||||||
@ -532,7 +533,9 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user && user.username) {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
|
}
|
||||||
}.bind(this), null, "POST", { u: this.username, p: this.password });
|
}.bind(this), null, "POST", { u: this.username, p: this.password });
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1144,8 +1147,11 @@
|
|||||||
userChanged: function(user) {
|
userChanged: function(user) {
|
||||||
this.resetPhotos();
|
this.resetPhotos();
|
||||||
if (user) {
|
if (user) {
|
||||||
|
this.mode = "memories";
|
||||||
this._loadAlbums();
|
this._loadAlbums();
|
||||||
this._loadPhotos();
|
this._loadPhotos();
|
||||||
|
} else {
|
||||||
|
this.mode = "login";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1187,7 +1193,6 @@
|
|||||||
|
|
||||||
if (results && results.username) {
|
if (results && results.username) {
|
||||||
this.user = results;
|
this.user = results;
|
||||||
this.mode = "memories";
|
|
||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user