From e00120b0468be6c9fb5a7f8cc448b88e1bd960e9 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Tue, 30 Sep 2025 12:08:41 +0200 Subject: [PATCH] ov-components: update CLASSIC to Classic for consistency in theme handling --- .../src/lib/models/theme.model.ts | 2 +- .../src/lib/services/theme/theme.service.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/models/theme.model.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/models/theme.model.ts index 918a972b..5177c398 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/models/theme.model.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/models/theme.model.ts @@ -5,7 +5,7 @@ export enum OpenViduThemeMode { Light = 'light', Dark = 'dark', - CLASSIC = 'classic' + Classic = 'classic' } /** diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/services/theme/theme.service.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/services/theme/theme.service.ts index 7c02d7e2..53321917 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/services/theme/theme.service.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/services/theme/theme.service.ts @@ -25,7 +25,7 @@ import { StorageService } from '../storage/storage.service'; }) export class OpenViduThemeService { private readonly THEME_ATTRIBUTE = 'data-ov-theme'; - private currentThemeSubject = new BehaviorSubject(OpenViduThemeMode.CLASSIC); + private currentThemeSubject = new BehaviorSubject(OpenViduThemeMode.Classic); private currentVariablesSubject = new BehaviorSubject({}); /** @@ -45,7 +45,7 @@ export class OpenViduThemeService { initializeTheme(): void { const savedTheme = this.storageService.getTheme(); - const initialTheme = savedTheme || OpenViduThemeMode.CLASSIC; + const initialTheme = savedTheme || OpenViduThemeMode.Classic; this.applyTheme(initialTheme); this.currentThemeSubject.next(initialTheme); } @@ -149,7 +149,7 @@ export class OpenViduThemeService { private applyTheme(theme: OpenViduThemeMode): void { const documentElement = this.document.documentElement; const currentTheme = this.getCurrentTheme(); - if (theme === OpenViduThemeMode.CLASSIC) { + if (theme === OpenViduThemeMode.Classic) { documentElement.removeAttribute(this.THEME_ATTRIBUTE); const currentVariables = this.getDefaultVariablesForTheme(currentTheme); this.removeCSSVariables(currentVariables);