Changed how login page works based on user feedback. By default, we have the old login flow when authentication is enabled and in addition, we will auto fill the username based on last login on device. (#621)
This commit is contained in:
parent
34d171f0b4
commit
30a302bf99
4 changed files with 42 additions and 14 deletions
|
@ -16,6 +16,7 @@ export class AccountService implements OnDestroy {
|
|||
|
||||
baseUrl = environment.apiUrl;
|
||||
userKey = 'kavita-user';
|
||||
public lastLoginKey = 'kavita-lastlogin';
|
||||
currentUser: User | undefined;
|
||||
|
||||
// Stores values, when someone subscribes gives (1) of last values seen.
|
||||
|
@ -70,6 +71,7 @@ export class AccountService implements OnDestroy {
|
|||
});
|
||||
|
||||
localStorage.setItem(this.userKey, JSON.stringify(user));
|
||||
localStorage.setItem(this.lastLoginKey, user.username);
|
||||
}
|
||||
|
||||
this.currentUserSource.next(user);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue