Compare commits
3 commits
ac437dd9ff
...
2f10b94af8
Author | SHA1 | Date | |
---|---|---|---|
|
2f10b94af8 | ||
|
406b973654 | ||
|
89b916da28 |
1 changed files with 3 additions and 22 deletions
|
@ -324,7 +324,6 @@ const interfaceMod = {
|
|||
const getData = async (resource, index, customData, name) => {
|
||||
const capitalizedResource = resource[0].toUpperCase() + resource.slice(1)
|
||||
const result = {}
|
||||
console.log('GD', resource, index, customData, name)
|
||||
|
||||
if (customData) {
|
||||
result.nameUsed = 'custom' // custom data overrides name
|
||||
|
@ -334,13 +333,15 @@ const interfaceMod = {
|
|||
|
||||
if (result.nameUsed == null) {
|
||||
result.dataUsed = null
|
||||
console.log('GDR -', result)
|
||||
return result
|
||||
}
|
||||
|
||||
let fetchFunc = index[result.nameUsed]
|
||||
// Fallbacks
|
||||
if (!fetchFunc) {
|
||||
if (resource === 'style' || resource === 'palette') {
|
||||
return result
|
||||
}
|
||||
const newName = Object.keys(index)[0]
|
||||
fetchFunc = index[newName]
|
||||
console.warn(`${capitalizedResource} with id '${state.styleNameUsed}' not found, trying back to '${newName}'`)
|
||||
|
@ -351,12 +352,9 @@ const interfaceMod = {
|
|||
}
|
||||
result.dataUsed = await fetchFunc()
|
||||
}
|
||||
console.log('GDR +', result)
|
||||
return result
|
||||
}
|
||||
|
||||
console.log('RSI', rootState.instance)
|
||||
|
||||
const {
|
||||
style: instanceStyleName,
|
||||
palette: instancePaletteName
|
||||
|
@ -499,20 +497,6 @@ const interfaceMod = {
|
|||
userThemeV2Source || userThemeV2Snapshot,
|
||||
userThemeV2Name || instanceThemeV2Name
|
||||
)
|
||||
console.log(
|
||||
'V2 INDEX',
|
||||
themesIndex
|
||||
)
|
||||
console.log(
|
||||
'V2 DATA',
|
||||
userThemeV2Source,
|
||||
userThemeV2Snapshot
|
||||
)
|
||||
console.log(
|
||||
'V2 NAME',
|
||||
userThemeV2Name,
|
||||
instanceThemeV2Name
|
||||
)
|
||||
// themeNameUsed = theme.nameUsed
|
||||
state.themeDataUsed = theme.dataUsed
|
||||
}
|
||||
|
@ -566,12 +550,9 @@ const interfaceMod = {
|
|||
return result
|
||||
})()
|
||||
|
||||
console.log(state.themeNameUsed, state.themeDataUsed)
|
||||
const theme2ruleset = state.themeDataUsed && convertTheme2To3(normalizeThemeData(state.themeDataUsed))
|
||||
const hacks = []
|
||||
|
||||
console.log('T2R', theme2ruleset)
|
||||
|
||||
Object.entries(theme3hacks).forEach(([key, value]) => {
|
||||
switch (key) {
|
||||
case 'fonts': {
|
||||
|
|
Loading…
Add table
Reference in a new issue