theme directive adjust
This commit is contained in:
parent
5bff2507ea
commit
558b35f4fd
1 changed files with 5 additions and 2 deletions
|
@ -908,7 +908,7 @@ const app = new Vue({
|
||||||
} else {
|
} else {
|
||||||
this.cfg.visual.theme = theme
|
this.cfg.visual.theme = theme
|
||||||
}
|
}
|
||||||
this.chrome.appliedTheme.info = await fetch("themes/" + app.cfg.visual.theme.replace("index.less", "theme.json"))
|
this.chrome.appliedTheme.info = await (await fetch("themes/" + app.cfg.visual.theme.replace("index.less", "theme.json"))).json()
|
||||||
|
|
||||||
|
|
||||||
document.querySelector("#userTheme").href = `themes/${this.cfg.visual.theme}`
|
document.querySelector("#userTheme").href = `themes/${this.cfg.visual.theme}`
|
||||||
|
@ -918,8 +918,11 @@ const app = new Vue({
|
||||||
less.refresh()
|
less.refresh()
|
||||||
},
|
},
|
||||||
getThemeDirective(directive = "") {
|
getThemeDirective(directive = "") {
|
||||||
|
if(typeof this.chrome.appliedTheme.info != "object") {
|
||||||
|
return
|
||||||
|
}
|
||||||
if(this.chrome.appliedTheme.info.directives[directive]) {
|
if(this.chrome.appliedTheme.info.directives[directive]) {
|
||||||
return this.chrome.appliedTheme.info.directives[directive]
|
return this.chrome.appliedTheme.info.directives[directive].value
|
||||||
} else {
|
} else {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue