frontend: standardize theme key naming in ThemeService and index.html
This commit is contained in:
parent
1e1eaa7bf5
commit
1bf77ffde5
@ -7,7 +7,7 @@ export type Theme = 'light' | 'dark';
|
|||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class ThemeService {
|
export class ThemeService {
|
||||||
private readonly THEME_KEY = 'ov-meet-theme';
|
private readonly THEME_KEY = 'ovMeet-theme';
|
||||||
private readonly _currentTheme = signal<Theme>('light');
|
private readonly _currentTheme = signal<Theme>('light');
|
||||||
|
|
||||||
// Computed signals for reactivity
|
// Computed signals for reactivity
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<script>
|
<script>
|
||||||
// Apply the saved theme on initial load to prevent flickering
|
// Apply the saved theme on initial load to prevent flickering
|
||||||
(function () {
|
(function () {
|
||||||
const savedTheme = localStorage.getItem('ov-meet-theme') || 'light';
|
const savedTheme = localStorage.getItem('ovMeet-theme') || 'light';
|
||||||
if (savedTheme === 'dark') {
|
if (savedTheme === 'dark') {
|
||||||
document.documentElement.setAttribute('data-theme', 'dark');
|
document.documentElement.setAttribute('data-theme', 'dark');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user