rename variable to themeUseSystem from darkModeUseSystem.

This commit is contained in:
Jason Kulatunga
2022-06-04 08:18:40 -07:00
parent 1c4dd33381
commit f4f5d16b4a
4 changed files with 11 additions and 11 deletions
@@ -3,10 +3,10 @@
<div class="flex flex-col p-8 pb-0 overflow-hidden">
<div class="flex flex-col gt-md:flex-row">
<mat-slide-toggle class="mb-2" [(ngModel)]="darkModeUseSystem">Use system settings for dark mode</mat-slide-toggle>
<p [class.text-hint]="darkModeUseSystem">
<mat-slide-toggle class="mb-2" [(ngModel)]="themeUseSystem">Use system settings for dark mode</mat-slide-toggle>
<p [class.text-hint]="themeUseSystem">
Theme:
<mat-button-toggle-group class="ml-2" #group="matButtonToggleGroup" [(ngModel)]="theme" [disabled]="darkModeUseSystem">
<mat-button-toggle-group class="ml-2" #group="matButtonToggleGroup" [(ngModel)]="theme" [disabled]="themeUseSystem">
<mat-button-toggle value="light" aria-label="Light mode">
<mat-icon>light_mode</mat-icon>
</mat-button-toggle>
@@ -14,7 +14,7 @@ export class DashboardSettingsComponent implements OnInit {
dashboardDisplay: string;
dashboardSort: string;
temperatureUnit: string;
darkModeUseSystem: boolean;
themeUseSystem: boolean;
theme: string;
// Private
@@ -37,11 +37,11 @@ export class DashboardSettingsComponent implements OnInit {
this.dashboardDisplay = config.dashboardDisplay;
this.dashboardSort = config.dashboardSort;
this.temperatureUnit = config.temperatureUnit;
this.darkModeUseSystem = config.darkModeUseSystem;
this.themeUseSystem = config.themeUseSystem;
this.theme = config.theme;
});
}
saveSettings(): void {
@@ -49,7 +49,7 @@ export class DashboardSettingsComponent implements OnInit {
dashboardDisplay: this.dashboardDisplay,
dashboardSort: this.dashboardSort,
temperatureUnit: this.temperatureUnit,
darkModeUseSystem: this.darkModeUseSystem,
themeUseSystem: this.themeUseSystem,
theme: this.theme
}
this._configService.config = newSettings