mirror of
https://git.youjo.love/youjo/youjo-fe.git
synced 2024-11-20 05:49:54 +01:00
Merge branch 'fix-p-themes' into 'develop'
Fix p's weird corrupt theme data crashing theme engine See merge request pleroma/pleroma-fe!1334
This commit is contained in:
commit
eb2975b64d
1 changed files with 12 additions and 3 deletions
|
@ -242,9 +242,18 @@ export const generateShadows = (input, colors) => {
|
|||
panelHeader: 'panel',
|
||||
input: 'input'
|
||||
}
|
||||
const inputShadows = input.shadows && !input.themeEngineVersion
|
||||
? shadows2to3(input.shadows, input.opacity)
|
||||
: input.shadows || {}
|
||||
|
||||
const cleanInputShadows = Object.fromEntries(
|
||||
Object.entries(input.shadows)
|
||||
.map(([name, shadowSlot]) => [
|
||||
name,
|
||||
// defaulting color to black to avoid potential problems
|
||||
shadowSlot.map(shadowDef => ({ color: '#000000', ...shadowDef }))
|
||||
])
|
||||
)
|
||||
const inputShadows = cleanInputShadows && !input.themeEngineVersion
|
||||
? shadows2to3(cleanInputShadows, input.opacity)
|
||||
: cleanInputShadows || {}
|
||||
const shadows = Object.entries({
|
||||
...DEFAULT_SHADOWS,
|
||||
...inputShadows
|
||||
|
|
Loading…
Reference in a new issue