Improved auth views and imrpoved default settings handling #70
This commit is contained in:
@@ -41,7 +41,7 @@ export class ThemeService {
|
||||
const mail = this.authService.getEMailFromDecodedToken(token);
|
||||
|
||||
let defaultThemeName = localStorage.getItem(`default_themeName`);
|
||||
if (!defaultThemeName || defaultThemeName != Themes.Default) {
|
||||
if (!defaultThemeName) {
|
||||
defaultThemeName = Themes.Default;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,13 @@ export class ThemeService {
|
||||
this.setTheme(userThemeName);
|
||||
}
|
||||
|
||||
setTheme(name: string): void {
|
||||
setTheme(name: string, isDefault: boolean = false): void {
|
||||
if (isDefault) {
|
||||
localStorage.setItem(`default_themeName`, name);
|
||||
this.themeName$.next(name);
|
||||
return;
|
||||
}
|
||||
|
||||
this.authService.isUserLoggedInAsync().then(result => {
|
||||
if (!result) {
|
||||
localStorage.setItem(`default_themeName`, Themes.Default);
|
||||
|
Reference in New Issue
Block a user