diff --git a/src/frontend/app/app.component.ts b/src/frontend/app/app.component.ts index e68a5e00..e36b5bd8 100644 --- a/src/frontend/app/app.component.ts +++ b/src/frontend/app/app.component.ts @@ -1,12 +1,12 @@ import {Component, OnDestroy, OnInit} from '@angular/core'; import {AuthenticationService} from './model/network/authentication.service'; -import {Router} from '@angular/router'; import {Config} from '../../common/config/public/Config'; import {Title} from '@angular/platform-browser'; import {ShareService} from './ui/gallery/share.service'; import 'hammerjs'; import {Subscription} from 'rxjs'; import {NavigationService} from './model/navigation.service'; +import {ThemeService} from './model/theme.service'; @Component({ selector: 'app-pi-gallery2', @@ -17,12 +17,13 @@ export class AppComponent implements OnInit, OnDestroy { private subscription: Subscription = null; constructor( - private router: Router, private authenticationService: AuthenticationService, private shareService: ShareService, private navigation: NavigationService, - private title: Title + private title: Title, + private themeService: ThemeService ) { + themeService.init(); } async ngOnInit(): Promise { diff --git a/src/frontend/app/model/theme.service.ts b/src/frontend/app/model/theme.service.ts index f9100449..51742eb5 100644 --- a/src/frontend/app/model/theme.service.ts +++ b/src/frontend/app/model/theme.service.ts @@ -14,8 +14,12 @@ export class ThemeService { public readonly matcher = window.matchMedia('(prefers-color-scheme: dark)'); constructor(private cachingService: GalleryCacheService) { - if (cachingService.getThemeMode()) { - this.setMode(cachingService.getThemeMode()); + this.init(); + } + + public init() { + if (this.cachingService.getThemeMode()) { + this.setMode(this.cachingService.getThemeMode()); } else { this.setMode(Config.Gallery.Themes.defaultMode); } diff --git a/src/frontend/app/ui/login/login.component.css b/src/frontend/app/ui/login/login.component.css index 89b42824..dda38ec2 100644 --- a/src/frontend/app/ui/login/login.component.css +++ b/src/frontend/app/ui/login/login.component.css @@ -8,8 +8,6 @@ .card { min-width: 400px; - background-color: #F7F7F7; - box-shadow: 0 2px 2px rgba(0, 0, 0, 0.3); } .error-message { diff --git a/src/frontend/app/ui/sharelogin/share-login.component.css b/src/frontend/app/ui/sharelogin/share-login.component.css index 0f812344..c0d8ec61 100644 --- a/src/frontend/app/ui/sharelogin/share-login.component.css +++ b/src/frontend/app/ui/sharelogin/share-login.component.css @@ -24,9 +24,6 @@ .card { min-width: 400px; - background-color: #F7F7F7; - box-shadow: 0 2px 2px rgba(0, 0, 0, 0.3); - } .error-message {