mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Theme Support with a Dark Mode (#974)
* Stylesheets * Theme Configuration * Options Area * swal2 style Missed the swal2 styling and improved the table theming * Icon styling * Fix theme not saving * Update English Remove colour to make it more translatable between English and American * Update messages.json * Login logo * dropdown and login logo * btn-link and totp fix Added a border for extra readability on the btn-link * Organisation Styling * Update messages.json * Update webauthn-fallback.ts Add missing semicolon and enable console.error bypass for tslint * Fix contrast issues Update the blue to match the browser extension and lighten the grey for text-muted variable * Add Paypal Container and Loading svg file * Update jslib * Password Generator contrast fix
This commit is contained in:
@@ -5,7 +5,7 @@ import { ConstantsService } from 'jslib/services';
|
||||
export class HtmlStorageService implements StorageService {
|
||||
private localStorageKeys = new Set(['appId', 'anonymousAppId', 'rememberedEmail', 'passwordGenerationOptions',
|
||||
ConstantsService.disableFaviconKey, 'rememberEmail', 'enableGravatars', 'enableFullWidth',
|
||||
ConstantsService.localeKey, ConstantsService.autoConfirmFingerprints,
|
||||
ConstantsService.themeKey, ConstantsService.localeKey, ConstantsService.autoConfirmFingerprints,
|
||||
ConstantsService.vaultTimeoutKey, ConstantsService.vaultTimeoutActionKey, ConstantsService.ssoCodeVerifierKey,
|
||||
ConstantsService.ssoStateKey, 'ssoOrgIdentifier']);
|
||||
private localStorageStartsWithKeys = ['twoFactorToken_', ConstantsService.collapsedGroupingsKey + '_'];
|
||||
@@ -26,6 +26,12 @@ export class HtmlStorageService implements StorageService {
|
||||
if (vaultTimeoutAction == null) {
|
||||
await this.save(ConstantsService.vaultTimeoutActionKey, 'lock');
|
||||
}
|
||||
|
||||
// Default theme to match the browser if the theme isn't set
|
||||
const theme = await this.get<string>(ConstantsService.themeKey);
|
||||
if (theme == null) {
|
||||
await this.save(ConstantsService.themeKey, 'themeDefaultSet');
|
||||
}
|
||||
}
|
||||
|
||||
get<T>(key: string): Promise<T> {
|
||||
|
||||
Reference in New Issue
Block a user