mirror of
https://github.com/bitwarden/browser
synced 2025-12-22 03:03:43 +00:00
feat(platform-utils): Get and react to changes to the system theme (#161)
These changes will allow the WebExtension (and later the desktop application) to respect the system theme. I've added the Electron implementation until I realized that the required API [has been implemented but not released yet](https://www.electronjs.org/docs/api/native-theme/history). Let me know if you I should remove the code. Part of https://github.com/bitwarden/browser/issues/1256. https://www.electronjs.org/docs/api/native-theme Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
This commit is contained in:
@@ -34,5 +34,7 @@ export abstract class PlatformUtilsService {
|
||||
readFromClipboard: (options?: any) => Promise<string>;
|
||||
supportsBiometric: () => Promise<boolean>;
|
||||
authenticateBiometric: () => Promise<boolean>;
|
||||
getDefaultSystemTheme: () => 'light' | 'dark';
|
||||
onDefaultSystemThemeChange: (callback: ((theme: 'light' | 'dark') => unknown)) => unknown;
|
||||
supportsSecureStorage: () => boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user