MASSIVELY streamlined theme setting process, now EVERYTHING happens in a vuex action "setTheme" instead of several different applyTheme()s scattered around
This commit is contained in:
parent
8a41313bb4
commit
c6ccab778f
10 changed files with 158 additions and 110 deletions
|
|
@ -265,6 +265,7 @@ export const convertTheme2To3 = (data) => {
|
|||
const newRules = []
|
||||
Object.keys(data.fonts || {}).forEach(key => {
|
||||
if (!fontsKeys.has(key)) return
|
||||
if (!data.fonts[key]) return
|
||||
const originalFont = data.fonts[key].family
|
||||
const rule = { source: '2to3' }
|
||||
|
||||
|
|
|
|||
|
|
@ -150,12 +150,13 @@ const ruleToSelector = genericRuleToSelector(components)
|
|||
export const getEngineChecksum = () => engineChecksum
|
||||
|
||||
export const init = ({
|
||||
extraRuleset,
|
||||
inputRuleset,
|
||||
ultimateBackgroundColor,
|
||||
debug = false,
|
||||
liteMode = false,
|
||||
rootComponentName = 'Root'
|
||||
}) => {
|
||||
if (!inputRuleset) throw new Error('Ruleset is null or undefined!')
|
||||
const staticVars = {}
|
||||
const stacked = {}
|
||||
const computed = {}
|
||||
|
|
@ -164,7 +165,7 @@ export const init = ({
|
|||
...Object.values(components)
|
||||
.map(c => (c.defaultRules || []).map(r => ({ component: c.name, ...r, source: 'Built-in' })))
|
||||
.reduce((acc, arr) => [...acc, ...arr], []),
|
||||
...extraRuleset
|
||||
...inputRuleset
|
||||
].map(rule => {
|
||||
normalizeCombination(rule)
|
||||
let currentParent = rule.parent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue