fix theme2 editor
This commit is contained in:
parent
fd1e3f65a8
commit
691a79e3be
|
@ -138,7 +138,6 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.loadThemeFromLocalStorage()
|
|
||||||
if (typeof this.shadowSelected === 'undefined') {
|
if (typeof this.shadowSelected === 'undefined') {
|
||||||
this.shadowSelected = this.shadowsAvailable[0]
|
this.shadowSelected = this.shadowsAvailable[0]
|
||||||
}
|
}
|
||||||
|
@ -296,6 +295,9 @@ export default {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
themeDataUsed () {
|
||||||
|
return this.$store.state.interface.themeDataUsed
|
||||||
|
},
|
||||||
shadowsAvailable () {
|
shadowsAvailable () {
|
||||||
return Object.keys(DEFAULT_SHADOWS).sort()
|
return Object.keys(DEFAULT_SHADOWS).sort()
|
||||||
},
|
},
|
||||||
|
@ -478,15 +480,11 @@ export default {
|
||||||
this.dismissWarning()
|
this.dismissWarning()
|
||||||
},
|
},
|
||||||
loadThemeFromLocalStorage (confirmLoadSource = false, forceSnapshot = false) {
|
loadThemeFromLocalStorage (confirmLoadSource = false, forceSnapshot = false) {
|
||||||
const {
|
const theme = this.themeDataUsed?.source
|
||||||
customTheme: theme,
|
if (theme) {
|
||||||
customThemeSource: source
|
|
||||||
} = this.$store.getters.mergedConfig
|
|
||||||
if (theme || source) {
|
|
||||||
this.loadTheme(
|
this.loadTheme(
|
||||||
{
|
{
|
||||||
theme,
|
theme
|
||||||
source: forceSnapshot ? theme : source
|
|
||||||
},
|
},
|
||||||
'localStorage',
|
'localStorage',
|
||||||
confirmLoadSource
|
confirmLoadSource
|
||||||
|
@ -705,6 +703,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
themeDataUsed () {
|
||||||
|
this.loadThemeFromLocalStorage()
|
||||||
|
},
|
||||||
currentRadii () {
|
currentRadii () {
|
||||||
try {
|
try {
|
||||||
this.previewTheme.radii = generateRadii({ radii: this.currentRadii }).theme.radii
|
this.previewTheme.radii = generateRadii({ radii: this.currentRadii }).theme.radii
|
||||||
|
|
Loading…
Reference in a new issue