properly reset v3 stuff when applying v2 theme

This commit is contained in:
Henry Jameson 2024-12-04 10:46:24 +02:00
parent 7f9ab03447
commit 3c92941664

View file

@ -490,6 +490,8 @@ const interfaceMod = {
) )
state.styleNameUsed = style.nameUsed state.styleNameUsed = style.nameUsed
state.styleDataUsed = style.dataUsed state.styleDataUsed = style.dataUsed
state.themeDataUsed = null
state.themeNameUsed = null
} else { } else {
const theme = await getData( const theme = await getData(
'theme', 'theme',
@ -497,8 +499,12 @@ const interfaceMod = {
userThemeV2Source || userThemeV2Snapshot, userThemeV2Source || userThemeV2Snapshot,
userThemeV2Name || instanceThemeV2Name userThemeV2Name || instanceThemeV2Name
) )
// themeNameUsed = theme.nameUsed state.themeNameUsed = theme.nameUsed
state.themeDataUsed = theme.dataUsed state.themeDataUsed = theme.dataUsed
state.styleNameUsed = null
state.styleDataUsed = null
state.paletteNameUsed = null
state.paletteDataUsed = null
} }
}, },
async applyTheme ( async applyTheme (
@ -519,10 +525,6 @@ const interfaceMod = {
} }
await dispatch('getThemeData') await dispatch('getThemeData')
// commit('setOption', { name: 'palette', value: paletteNameUsed })
// commit('setOption', { name: 'style', value: styleNameUsed })
// commit('setOption', { name: 'theme', value: themeNameUsed })
const paletteIss = (() => { const paletteIss = (() => {
if (!state.paletteDataUsed) return null if (!state.paletteDataUsed) return null
const result = { const result = {