优化代码逻辑,修复潜在播放问题

This commit is contained in:
lyswhut
2023-01-14 16:03:56 +08:00
parent d3c8f16aed
commit 850a429243
35 changed files with 85 additions and 342 deletions
@@ -127,9 +127,9 @@ export default {
const autoTheme = reactive({})
const updateAutoTheme = (info) => {
let light = findTheme(info, appSetting['theme.lightId'])
if (!light) light = info.themes.find(theme => theme.id == 'green')
light ??= info.themes.find(theme => theme.id == 'green')
let dark = findTheme(info, appSetting['theme.darkId'])
if (!dark) dark = info.themes.find(theme => theme.id == 'black')
dark ??= info.themes.find(theme => theme.id == 'black')
autoTheme['--color-primary-theme-light'] = light.config.themeColors['--color-theme']
autoTheme['--background-image-theme-light'] = light.isCustom
? light.config.extInfo['--background-image'] == 'none'