Revert "Reapply "fix: Vorübergehend nur Dark Mode erlaubt wegen localStorage Problem""
This reverts commit c604e5c5ef0a8d85de3d71670c76e0a2249f1927.
This commit is contained in:
parent
6cc3430592
commit
3a72c4c9fa
@ -65,7 +65,7 @@ export class BaseTableComponent<TModel, TApiService extends ApiService<TModel>>
|
||||
}
|
||||
};
|
||||
|
||||
theme: GuiTheme = GuiTheme.DARK;
|
||||
theme: GuiTheme = localStorage.getItem('theme') === 'dark' ? GuiTheme.DARK : GuiTheme.FABRIC;
|
||||
|
||||
private themeSubscription: Subscription = new Subscription();
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@ export class LoginComponent {
|
||||
IsPwdHidden: boolean = true;
|
||||
|
||||
constructor(private authService: AuthenticationService, @Inject(MAT_DIALOG_DATA) public data: any) {
|
||||
//localStorage.getItem('theme') === 'dark'
|
||||
if (typeof (this.afterLogin) == typeof (data.afterLogin))
|
||||
this.afterLogin = data.afterLogin;
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ export class NavMenuComponent {
|
||||
}
|
||||
|
||||
get isDarkTheme(): boolean {
|
||||
return true;
|
||||
return localStorage.getItem('theme') === 'dark'
|
||||
}
|
||||
|
||||
collapse() {
|
||||
|
||||
@ -17,6 +17,7 @@ export class ColorModeService {
|
||||
}
|
||||
|
||||
setTheme(theme: Theme) {
|
||||
localStorage.setItem('theme', theme)
|
||||
this.updateTheme();
|
||||
}
|
||||
|
||||
@ -75,7 +76,7 @@ export const ParseTheme: (value: string) => Theme | undefined = (value: string)
|
||||
}
|
||||
|
||||
export function GetLocalTheme(): Theme {
|
||||
let sTheme: string | null = 'dark';
|
||||
let sTheme: string | null = localStorage.getItem('theme');
|
||||
|
||||
if (sTheme === null)
|
||||
return Theme.Dark;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user