2023-11-27 21:59:44 +01:00
|
|
|
import { ThemingService } from "@bitwarden/angular/platform/services/theming/theming.service";
|
|
|
|
import { ThemeType } from "@bitwarden/common/platform/enums";
|
2022-06-23 13:36:05 +02:00
|
|
|
|
|
|
|
export class DesktopThemingService extends ThemingService {
|
|
|
|
protected async getSystemTheme(): Promise<ThemeType> {
|
2023-10-13 12:20:27 +02:00
|
|
|
return await ipc.platform.getSystemTheme();
|
2022-06-23 13:36:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected monitorSystemThemeChanges(): void {
|
2023-10-13 12:20:27 +02:00
|
|
|
ipc.platform.onSystemThemeUpdated((theme: ThemeType) => this.updateSystemTheme(theme));
|
2022-06-23 13:36:05 +02:00
|
|
|
}
|
|
|
|
}
|