This commit is contained in:
Evert Prants 2022-04-03 17:31:51 +03:00
parent 9b69470e3f
commit 82c45fd58b
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -331,10 +331,12 @@ export class ViewCanvas {
public setUser(user: IcyNetUser): void { public setUser(user: IcyNetUser): void {
this._user = user; this._user = user;
this.picker.setLoggedIn(user);
if (user) {
this._userInfo.innerText = user.username; this._userInfo.innerText = user.username;
this._userInfo.classList.add('logged-in'); this._userInfo.classList.add('logged-in');
this._userInfo.setAttribute('href', '/logout'); this._userInfo.setAttribute('href', '/logout');
this.picker.setLoggedIn(user); }
} }
private _updateURL = debounce(() => { private _updateURL = debounce(() => {