fix(client): Fix theme color
This commit is contained in:
parent
6ff84a1061
commit
35a8c37922
3 changed files with 3 additions and 1 deletions
|
@ -40,7 +40,7 @@ html
|
|||
if (theme) {
|
||||
for (const [k, v] of Object.entries(JSON.parse(theme))) {
|
||||
document.documentElement.style.setProperty(`--${k}`, v.toString());
|
||||
if (k === 'html') {
|
||||
if (k === 'htmlThemeColor') {
|
||||
for (const tag of document.head.children) {
|
||||
if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') {
|
||||
tag.setAttribute('content', v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue