fix for theme info
This commit is contained in:
parent
e574b6c6e5
commit
bef0132e90
1 changed files with 7 additions and 3 deletions
|
@ -916,10 +916,14 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
const info = {}
|
const info = {}
|
||||||
try {
|
try {
|
||||||
info = await (await fetch("themes/" + app.cfg.visual.theme.replace("index.less", "theme.json"))).json()
|
const infoResponse = await fetch("themes/" + app.cfg.visual.theme.replace("index.less", "theme.json"))
|
||||||
}catch(e){e=null}
|
this.chrome.appliedTheme.info = await infoResponse.json()
|
||||||
|
}catch(e){
|
||||||
|
e=null
|
||||||
|
console.warn("failed to get theme.json")
|
||||||
|
this.chrome.appliedTheme.info = {}
|
||||||
|
}
|
||||||
|
|
||||||
this.chrome.appliedTheme.info = info
|
|
||||||
|
|
||||||
if(!onlyPrefs) {
|
if(!onlyPrefs) {
|
||||||
document.querySelector("#userTheme").href = `themes/${this.cfg.visual.theme}`
|
document.querySelector("#userTheme").href = `themes/${this.cfg.visual.theme}`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue