1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

add theme support to browser extension

This commit is contained in:
Kyle Spearrin
2018-05-30 17:26:43 -04:00
parent 7c0d4a1970
commit 344cd2ac40
7 changed files with 162 additions and 6 deletions

View File

@@ -77,7 +77,13 @@ export function initFactory(i18nService: I18nService, storageService: StorageSer
stateService.save(ConstantsService.disableFaviconKey,
await storageService.get<boolean>(ConstantsService.disableFaviconKey));
let theme = await storageService.get<string>(ConstantsService.themeKey);
if (theme == null) {
theme = 'light';
}
window.document.documentElement.classList.add('locale_' + i18nService.translationLocale);
window.document.documentElement.classList.add('theme_' + theme);
authService.init();
const analytics = new Analytics(window, () => BrowserApi.gaFilter(), null, null, null, () => {