diff --git a/src/App.js b/src/App.js index d1628f34f..611a40cf7 100644 --- a/src/App.js +++ b/src/App.js @@ -87,7 +87,13 @@ export default { return useInterfaceStore().themeApplied }, 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 () { return '-' + this.layoutType diff --git a/src/stores/interface.js b/src/stores/interface.js index c8fc40392..b2aa9d8e6 100644 --- a/src/stores/interface.js +++ b/src/stores/interface.js @@ -521,16 +521,18 @@ export const useInterfaceStore = defineStore('interface', { theme3hacks } = window.vuex.state.config 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) const forceRecompile = forceThemeRecompilation || recompile + + await this.getThemeData() + if (!forceRecompile && !themeDebug && await tryLoadCache()) { this.themeChangeInProgress = false return this.setThemeApplied() } window.splashUpdate('splash.theme') - await this.getThemeData() try { const paletteIss = (() => {