mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
Add theme enums and platformUtilsService helper (#497)
* Use enum for themes, add getEffectiveTheme * Update electron and cli to use theme refactor
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { DeviceType } from '../enums/deviceType';
|
||||
import { ThemeType } from '../enums/themeType';
|
||||
|
||||
export abstract class PlatformUtilsService {
|
||||
identityClientId: string;
|
||||
@@ -28,7 +29,8 @@ export abstract class PlatformUtilsService {
|
||||
readFromClipboard: (options?: any) => Promise<string>;
|
||||
supportsBiometric: () => Promise<boolean>;
|
||||
authenticateBiometric: () => Promise<boolean>;
|
||||
getDefaultSystemTheme: () => Promise<'light' | 'dark'>;
|
||||
onDefaultSystemThemeChange: (callback: ((theme: 'light' | 'dark') => unknown)) => unknown;
|
||||
getDefaultSystemTheme: () => Promise<ThemeType.Light | ThemeType.Dark>;
|
||||
onDefaultSystemThemeChange: (callback: ((theme: ThemeType.Light | ThemeType.Dark) => unknown)) => unknown;
|
||||
getEffectiveTheme: () => Promise<ThemeType>;
|
||||
supportsSecureStorage: () => boolean;
|
||||
}
|
||||
|
||||
7
common/src/enums/themeType.ts
Normal file
7
common/src/enums/themeType.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export enum ThemeType {
|
||||
System = 'system',
|
||||
Light = 'light',
|
||||
Dark = 'dark',
|
||||
Nord = 'nord',
|
||||
SolarizedDark = 'solarizedDark',
|
||||
}
|
||||
Reference in New Issue
Block a user