Fetch theme info from @meta
This commit is contained in:
parent
2d8f99f86b
commit
dc65bbc051
2 changed files with 11 additions and 3 deletions
|
|
@ -87,7 +87,13 @@ export default {
|
||||||
return useInterfaceStore().themeApplied
|
return useInterfaceStore().themeApplied
|
||||||
},
|
},
|
||||||
currentTheme () {
|
currentTheme () {
|
||||||
return this.mergedConfig.style || this.$store.state.instance.style
|
if (useInterfaceStore().styleDataUsed) {
|
||||||
|
const themeName = useInterfaceStore().styleDataUsed.find(x => x.component === '@meta').directives.name
|
||||||
|
|
||||||
|
return themeName.replaceAll(" ", "-").toLowerCase()
|
||||||
|
} else {
|
||||||
|
return 'stock'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
layoutModalClass () {
|
layoutModalClass () {
|
||||||
return '-' + this.layoutType
|
return '-' + this.layoutType
|
||||||
|
|
|
||||||
|
|
@ -521,16 +521,18 @@ export const useInterfaceStore = defineStore('interface', {
|
||||||
theme3hacks
|
theme3hacks
|
||||||
} = window.vuex.state.config
|
} = window.vuex.state.config
|
||||||
this.themeChangeInProgress = true
|
this.themeChangeInProgress = true
|
||||||
// If we're not not forced to recompile try using
|
// If we're not forced to recompile try using
|
||||||
// cache (tryLoadCache return true if load successful)
|
// cache (tryLoadCache return true if load successful)
|
||||||
|
|
||||||
const forceRecompile = forceThemeRecompilation || recompile
|
const forceRecompile = forceThemeRecompilation || recompile
|
||||||
|
|
||||||
|
await this.getThemeData()
|
||||||
|
|
||||||
if (!forceRecompile && !themeDebug && await tryLoadCache()) {
|
if (!forceRecompile && !themeDebug && await tryLoadCache()) {
|
||||||
this.themeChangeInProgress = false
|
this.themeChangeInProgress = false
|
||||||
return this.setThemeApplied()
|
return this.setThemeApplied()
|
||||||
}
|
}
|
||||||
window.splashUpdate('splash.theme')
|
window.splashUpdate('splash.theme')
|
||||||
await this.getThemeData()
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const paletteIss = (() => {
|
const paletteIss = (() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue