aboutsummaryrefslogtreecommitdiff
path: root/src/components/settings_modal/tabs/theme_tab
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2024-07-10 22:49:56 +0300
committerHenry Jameson <me@hjkos.com>2024-07-10 22:49:56 +0300
commitc6ccab778f78bf65cebcad1c5e0943d427254098 (patch)
treec85cd45dc4f66b1d55eb47b4e132d3c72f3da9a5 /src/components/settings_modal/tabs/theme_tab
parent8a41313bb4957471b2c5577661ae388300097f12 (diff)
MASSIVELY streamlined theme setting process, now EVERYTHING happens in a vuex action "setTheme" instead of several different applyTheme()s scattered around
Diffstat (limited to 'src/components/settings_modal/tabs/theme_tab')
-rw-r--r--src/components/settings_modal/tabs/theme_tab/theme_tab.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.js b/src/components/settings_modal/tabs/theme_tab/theme_tab.js
index 72e2b625..7ca3b066 100644
--- a/src/components/settings_modal/tabs/theme_tab/theme_tab.js
+++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.js
@@ -502,6 +502,7 @@ export default {
this.$store.dispatch('setOption', {
name: 'customTheme',
value: {
+ ignore: true,
themeFileVersion: this.selectedVersion,
themeEngineVersion: CURRENT_VERSION,
...this.previewTheme
@@ -699,13 +700,13 @@ export default {
}
},
updateTheme3Preview () {
- console.log(this.previewTheme)
const theme2 = convertTheme2To3(this.previewTheme)
const theme3 = init({
- extraRuleset: theme2,
+ inputRuleset: theme2,
ultimateBackgroundColor: '#000000',
liteMode: true
})
+
this.themeV3Preview = getCssRules(theme3.eager)
.map(x => {
if (x.startsWith('html')) {
@@ -722,7 +723,7 @@ export default {
watch: {
currentRadii () {
try {
- this.previewTheme.radii = generateRadii({ radii: this.currentRadii }).theme
+ this.previewTheme.radii = generateRadii({ radii: this.currentRadii }).theme.radii
this.radiiInvalid = false
} catch (e) {
this.radiiInvalid = true
@@ -744,7 +745,7 @@ export default {
fontsLocal: {
handler () {
try {
- this.previewTheme.fonts = generateFonts({ fonts: this.fontsLocal }).theme
+ this.previewTheme.fonts = generateFonts({ fonts: this.fontsLocal }).theme.fonts
this.fontsInvalid = false
} catch (e) {
this.fontsInvalid = true