chore: update Angular cache and TypeScript build info files

This commit is contained in:
2025-09-20 23:18:42 -04:00
parent 3f04191623
commit 5d6aa17b81
6 changed files with 115 additions and 39 deletions
+16 -13
View File
@@ -251,37 +251,40 @@ export class HeaderComponent {
}
// Theme helpers for styling based on current theme
private resolveThemeSlug(slug: string | null | undefined): 'light' | 'dark' | 'black' | 'blue' | 'system' {
const v = (slug || 'system') as string;
if (v === 'system') return (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light';
if (v === 'light' || v === 'dark' || v === 'black' || v === 'blue') return v;
return 'light';
}
getCurrentTheme(): string {
return this.currentTheme() || 'system';
}
isLightTheme(): boolean {
const t = this.getCurrentTheme();
return t === 'light' || t === 'system';
return this.resolveThemeSlug(this.getCurrentTheme()) === 'light';
}
isDarkTheme(): boolean {
const t = this.getCurrentTheme();
return t === 'dark';
return this.resolveThemeSlug(this.getCurrentTheme()) === 'dark';
}
isBlackTheme(): boolean {
const t = this.getCurrentTheme();
return t === 'black';
return this.resolveThemeSlug(this.getCurrentTheme()) === 'black';
}
isBlueTheme(): boolean {
const t = this.getCurrentTheme();
return t === 'blue';
return this.resolveThemeSlug(this.getCurrentTheme()) === 'blue';
}
getThemeClasses(): { [key: string]: boolean } {
const theme = this.getCurrentTheme();
const rt = this.resolveThemeSlug(this.getCurrentTheme());
return {
'theme-light': theme === 'light' || theme === 'system',
'theme-dark': theme === 'dark',
'theme-black': theme === 'black',
'theme-blue': theme === 'blue'
'theme-light': rt === 'light',
'theme-dark': rt === 'dark',
'theme-black': rt === 'black',
'theme-blue': rt === 'blue'
};
}