Set dark theme as default

master
Max Ehrlicher-Schmidt 4 years ago
parent ba5b65741f
commit ba95b857a7

@ -16,7 +16,7 @@ import { DomSanitizer } from '@angular/platform-browser';
})
export class AppComponent {
title = 'fLotte-fRontend';
darkThemeIsActive: boolean = false;
darkThemeIsActive: boolean = true;
loggedIn = false;
@ViewChild('sidenav') public sideNav:MatSidenav;
@ -36,7 +36,7 @@ export class AppComponent {
) {
this.renderer.addClass(document.body, 'mat-app-background'); //so the background color changes dependent on current theme
this.themeService.load();
this.darkThemeIsActive = this.themeService.currentActive() === 'dark-theme';
this.darkThemeIsActive = this.themeService.currentActive() !== 'light-theme';
this.authService.loggedIn.subscribe((value) => (this.loggedIn = value));
this.matIconRegistry.addSvgIcon(
"cargobike",

@ -2,7 +2,6 @@
[dataService]="dataService"
[propertiesInfo]="propertiesInfo"
[getHeadline]="getHeadline"
[headlineDataPath]="headlineDataPath"
[headlineIconName]="headlineIconName"
[pageDataGQLType]="pageDataGQLType"
[pageDataGQLUpdateInputType]="pageDataGQLUpdateInputType"

@ -21,7 +21,7 @@ export class ColorThemeService {
this.colorTheme = window.matchMedia('(prefers-color-theme: dark)').matches ? 'dark-theme' : 'light-theme';
} else {
// If browser dont support prefers-color-theme, set it as default to dark
this.colorTheme = 'light-theme';
this.colorTheme = 'dark-theme';
}
}

Loading…
Cancel
Save