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: [
|
||||
"widthChanged(calcWidth)",
|
||||
"modeChanged(mode)",
|
||||
"dateChanged(date)"
|
||||
"dateChanged(date)",
|
||||
"userChanged(user)"
|
||||
],
|
||||
|
||||
disableLogin: function(username, password) {
|
||||
@ -532,7 +533,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
this.user = user;
|
||||
if (user && user.username) {
|
||||
this.user = user;
|
||||
}
|
||||
}.bind(this), null, "POST", { u: this.username, p: this.password });
|
||||
},
|
||||
|
||||
@ -1144,8 +1147,11 @@
|
||||
userChanged: function(user) {
|
||||
this.resetPhotos();
|
||||
if (user) {
|
||||
this.mode = "memories";
|
||||
this._loadAlbums();
|
||||
this._loadPhotos();
|
||||
} else {
|
||||
this.mode = "login";
|
||||
}
|
||||
},
|
||||
|
||||
@ -1187,7 +1193,6 @@
|
||||
|
||||
if (results && results.username) {
|
||||
this.user = results;
|
||||
this.mode = "memories";
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user