mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
Only update to system theme if theme is Default
This commit is contained in:
@@ -124,9 +124,12 @@ export class AppComponent implements OnInit {
|
|||||||
window.onkeypress = () => this.recordActivity();
|
window.onkeypress = () => this.recordActivity();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.platformUtilsService.onDefaultSystemThemeChange(theme => {
|
this.platformUtilsService.onDefaultSystemThemeChange(async systemTheme => {
|
||||||
window.document.documentElement.classList.remove('theme_light', 'theme_dark');
|
const theme = await this.storageService.get<string>(ConstantsService.themeKey);
|
||||||
window.document.documentElement.classList.add('theme_' + theme);
|
if (theme == null) {
|
||||||
|
window.document.documentElement.classList.remove('theme_light', 'theme_dark');
|
||||||
|
window.document.documentElement.classList.add('theme_' + systemTheme);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {
|
this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user