mirror of
https://github.com/bitwarden/jslib
synced 2025-12-06 00:03:29 +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,6 +1,7 @@
|
||||
import * as child_process from 'child_process';
|
||||
|
||||
import { DeviceType } from 'jslib-common/enums/deviceType';
|
||||
import { ThemeType } from 'jslib-common/enums/themeType';
|
||||
|
||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||
|
||||
@@ -135,13 +136,17 @@ export class CliPlatformUtilsService implements PlatformUtilsService {
|
||||
}
|
||||
|
||||
getDefaultSystemTheme() {
|
||||
return Promise.resolve('light' as 'light' | 'dark');
|
||||
return Promise.resolve(ThemeType.Light as ThemeType.Light | ThemeType.Dark);
|
||||
}
|
||||
|
||||
onDefaultSystemThemeChange() {
|
||||
/* noop */
|
||||
}
|
||||
|
||||
getEffectiveTheme() {
|
||||
return Promise.resolve(ThemeType.Light);
|
||||
}
|
||||
|
||||
supportsSecureStorage(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user