diff --git a/webapp/frontend/src/@treo/services/config/config.service.ts b/webapp/frontend/src/@treo/services/config/config.service.ts index b68bff1..278b506 100644 --- a/webapp/frontend/src/@treo/services/config/config.service.ts +++ b/webapp/frontend/src/@treo/services/config/config.service.ts @@ -52,7 +52,7 @@ export class TreoConfigService //Store the config in localstorage localStorage.setItem(SCRUTINY_CONFIG_LOCAL_STORAGE_KEY, JSON.stringify(config)); - + config.theme = this.determineTheme(config); // Execute the observable @@ -73,7 +73,7 @@ export class TreoConfigService * Checks if theme should be set to dark based on config & system settings */ private determineTheme(config:AppConfig): string { - return (config.darkModeUseSystem && this.systemPrefersDark) ? "dark" : config.theme; + return (config.themeUseSystem && this.systemPrefersDark) ? "dark" : config.theme; } // ----------------------------------------------------------------------------------------------------- diff --git a/webapp/frontend/src/app/core/config/app.config.ts b/webapp/frontend/src/app/core/config/app.config.ts index 913292c..f2ef91b 100644 --- a/webapp/frontend/src/app/core/config/app.config.ts +++ b/webapp/frontend/src/app/core/config/app.config.ts @@ -18,7 +18,7 @@ export interface AppConfig temperatureUnit: string; - darkModeUseSystem: boolean; + themeUseSystem: boolean; } /** @@ -38,6 +38,6 @@ export const appConfig: AppConfig = { temperatureUnit: "celsius", - darkModeUseSystem: true, + themeUseSystem: true, }; diff --git a/webapp/frontend/src/app/layout/common/dashboard-settings/dashboard-settings.component.html b/webapp/frontend/src/app/layout/common/dashboard-settings/dashboard-settings.component.html index 2ef214f..156ce37 100644 --- a/webapp/frontend/src/app/layout/common/dashboard-settings/dashboard-settings.component.html +++ b/webapp/frontend/src/app/layout/common/dashboard-settings/dashboard-settings.component.html @@ -3,10 +3,10 @@
+
Theme:
-