improvements to backcompat + fixes to topbar
This commit is contained in:
parent
2172529dd0
commit
c3e6e7c61d
|
@ -13,7 +13,15 @@ export default {
|
||||||
defaultRules: [
|
defaultRules: [
|
||||||
{
|
{
|
||||||
directives: {
|
directives: {
|
||||||
background: '--fg'
|
background: '--fg',
|
||||||
|
shadow: [{
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
blur: 4,
|
||||||
|
spread: 0,
|
||||||
|
color: '#000000',
|
||||||
|
alpha: 0.6
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -13,7 +13,6 @@ export const applyTheme = (input) => {
|
||||||
const t1 = performance.now()
|
const t1 = performance.now()
|
||||||
console.log('Themes 2 initialization took ' + (t1 - t0) + 'ms')
|
console.log('Themes 2 initialization took ' + (t1 - t0) + 'ms')
|
||||||
const extraRules = convertTheme2To3(theme)
|
const extraRules = convertTheme2To3(theme)
|
||||||
console.log(extraRules)
|
|
||||||
const themes3 = init(extraRules)
|
const themes3 = init(extraRules)
|
||||||
const t2 = performance.now()
|
const t2 = performance.now()
|
||||||
console.log('Themes 3 initialization took ' + (t2 - t1) + 'ms')
|
console.log('Themes 3 initialization took ' + (t2 - t1) + 'ms')
|
||||||
|
|
|
@ -222,7 +222,7 @@ export const convertTheme2To3 = (data) => {
|
||||||
rule.variant = 'outgoing'
|
rule.variant = 'outgoing'
|
||||||
} else if (prefix === 'panel') {
|
} else if (prefix === 'panel') {
|
||||||
rule.component = 'PanelHeader'
|
rule.component = 'PanelHeader'
|
||||||
} else if (prefix === 'topbar') {
|
} else if (prefix === 'topBar') {
|
||||||
rule.component = 'TopBar'
|
rule.component = 'TopBar'
|
||||||
} else if (prefix === 'chatMessage') {
|
} else if (prefix === 'chatMessage') {
|
||||||
rule.component = 'ChatMessage'
|
rule.component = 'ChatMessage'
|
||||||
|
@ -248,6 +248,7 @@ export const convertTheme2To3 = (data) => {
|
||||||
case 'Border':
|
case 'Border':
|
||||||
newRule.parent = rule
|
newRule.parent = rule
|
||||||
newRule.directives.textColor = data.colors[key]
|
newRule.directives.textColor = data.colors[key]
|
||||||
|
newRule.directives.textAuto = 'no-auto'
|
||||||
variantArray = parts.slice(0, -1)
|
variantArray = parts.slice(0, -1)
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
export default {
|
|
||||||
name: 'TopBar',
|
|
||||||
selector: 'nav',
|
|
||||||
validInnerComponents: [
|
|
||||||
'Link',
|
|
||||||
'Text',
|
|
||||||
'Icon'
|
|
||||||
],
|
|
||||||
defaultRules: [
|
|
||||||
{
|
|
||||||
directives: {
|
|
||||||
shadow: [{
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
blur: 4,
|
|
||||||
spread: 0,
|
|
||||||
color: '#000000',
|
|
||||||
alpha: 0.6
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
Reference in New Issue