mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-29 17:38:04 +01:00
Respond to native OS theme changes
This commit is contained in:
parent
c7345197f7
commit
c225210a44
@ -124,6 +124,11 @@ export class AppComponent implements OnInit {
|
|||||||
window.onkeypress = () => this.recordActivity();
|
window.onkeypress = () => this.recordActivity();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.platformUtilsService.onDefaultSystemThemeChange(theme => {
|
||||||
|
window.document.documentElement.classList.remove('theme_light', 'theme_dark');
|
||||||
|
window.document.documentElement.classList.add('theme_' + theme);
|
||||||
|
});
|
||||||
|
|
||||||
this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {
|
this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {
|
||||||
this.ngZone.run(async () => {
|
this.ngZone.run(async () => {
|
||||||
switch (message.command) {
|
switch (message.command) {
|
||||||
|
Loading…
Reference in New Issue
Block a user