1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-20 09:23:23 +00:00
Files
browser/apps/desktop/src/app/services/desktop-theming.service.ts
Thomas Rittson 29b5643310 [AC-2278] [BEEEP] Typesafe Angular DI (#8206)
Use SafeProvider as a factory for all our providers to ensure
that the DI token, implementation, and deps all match.

---------

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2024-03-12 18:21:57 -05:00

13 lines
474 B
TypeScript

import { ThemingService } from "@bitwarden/angular/platform/services/theming/theming.service";
import { ThemeType } from "@bitwarden/common/platform/enums";
export class DesktopThemingService extends ThemingService {
protected async getSystemTheme(): Promise<ThemeType> {
return await ipc.platform.getSystemTheme();
}
protected monitorSystemThemeChanges(): void {
ipc.platform.onSystemThemeUpdated((theme: ThemeType) => this.updateSystemTheme(theme));
}
}