Browse Source

Refactoring

pull/3129/head
Thomas Kaul 1 year ago
parent
commit
d6de0de61d
  1. 7
      apps/client/src/app/app.component.ts

7
apps/client/src/app/app.component.ts

@ -201,12 +201,15 @@ export class AppComponent implements OnDestroy, OnInit {
const themeColor = getCssVariable( const themeColor = getCssVariable(
isDarkTheme ? '--dark-background' : '--light-background' isDarkTheme ? '--dark-background' : '--light-background'
); );
const metaTag = this.document.querySelector('meta[name="theme-color"]');
if (isDarkTheme) { if (isDarkTheme) {
this.document.body.classList.add('is-dark-theme'); this.document.body.classList.add('is-dark-theme');
} else { } else {
this.document.body.classList.remove('is-dark-theme'); this.document.body.classList.remove('is-dark-theme');
} }
metaTag.setAttribute('content', themeColor);
this.document
.querySelector('meta[name="theme-color"]')
.setAttribute('content', themeColor);
} }
} }

Loading…
Cancel
Save