remove extraneous dispatches

This commit is contained in:
Henry Jameson 2024-11-14 21:52:50 +02:00
parent 454aa695ab
commit f4483e1ee4

View file

@ -293,33 +293,21 @@ const AppearanceTab = {
return key === palette return key === palette
}, },
setStyle (name) { setStyle (name) {
this.$store.dispatch('resetThemeV2')
this.$store.dispatch('setTheme', name) this.$store.dispatch('setTheme', name)
this.$store.dispatch('applyTheme')
}, },
setTheme (name) { setTheme (name) {
this.$store.dispatch('resetThemeV3')
this.$store.dispatch('setTheme', name) this.$store.dispatch('setTheme', name)
this.$store.dispatch('applyTheme')
}, },
setPalette (name, data) { setPalette (name, data) {
this.$store.dispatch('resetThemeV2')
this.$store.dispatch('setPalette', name) this.$store.dispatch('setPalette', name)
this.$store.dispatch('applyTheme')
this.userPalette = data this.userPalette = data
}, },
setPaletteCustom (data) { setPaletteCustom (data) {
console.log('APPLY CUSTOM', data)
this.$store.dispatch('resetThemeV2')
this.$store.dispatch('setPaletteCustom', data) this.$store.dispatch('setPaletteCustom', data)
this.$store.dispatch('applyTheme')
this.userPalette = data this.userPalette = data
}, },
resetTheming (name) { resetTheming (name) {
this.$store.dispatch('resetThemeV2')
this.$store.dispatch('resetThemeV3')
this.$store.dispatch('setStyle', 'stock') this.$store.dispatch('setStyle', 'stock')
this.$store.dispatch('applyTheme')
}, },
previewTheme (key, input) { previewTheme (key, input) {
let theme3 let theme3