mirror of
https://github.com/bitwarden/browser
synced 2026-01-20 09:23:23 +00:00
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>
13 lines
474 B
TypeScript
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));
|
|
}
|
|
}
|