WEB-492: Material Design 3 implementation: Login

This commit is contained in:
Jose Alberto Hernandez
2026-01-04 14:06:28 -05:00
parent 5af11fe757
commit df7274626c
58 changed files with 3396 additions and 855 deletions
@@ -2,7 +2,7 @@ import { Component, OnChanges, OnInit, SimpleChanges, inject } from '@angular/co
import { ThemingService } from './theming.service';
import { SettingsService } from 'app/settings/settings.service';
import { MatIconButton } from '@angular/material/button';
import { MatIcon } from '@angular/material/icon';
import { M3IconComponent } from '../m3-ui/m3-icon/m3-icon.component';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
@Component({
@@ -12,7 +12,7 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
imports: [
...STANDALONE_SHARED_IMPORTS,
MatIconButton,
MatIcon
M3IconComponent
]
})
export class ThemeToggleComponent implements OnInit, OnChanges {
@@ -29,8 +29,16 @@ export class ThemeToggleComponent implements OnInit, OnChanges {
this.darkModeOn = !!this.settingsService.themeDarkEnabled;
}
/**
* Toggle between light and dark themes
* This method handles the complete theme switching process:
* 1. Toggles the local state
* 2. Persists the preference to settings
*/
toggleTheme() {
// Step 1: Toggle the dark mode state
this.darkModeOn = !this.darkModeOn;
// Step 2: Persist the theme preference to localStorage via settings service
this.settingsService.setThemeDarkEnabled(this.darkModeOn);
this.themingService.setDarkMode(this.darkModeOn);
}