修复自定义主题背景路径存在空格时无法显示的问题

This commit is contained in:
lyswhut
2022-11-16 19:18:59 +08:00
parent 7daa626d55
commit a6fd41900f
6 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -250,7 +250,7 @@ export const getTheme = () => {
theme.config.extInfo['--background-image'] =
isUrl(theme.config.extInfo['--background-image'])
? `url(${theme.config.extInfo['--background-image']})`
: `url(file:///${encodePath(joinPath(global.lxDataPath, 'theme_images', theme.config.extInfo['--background-image']).replaceAll('\\', '/'))})`
: `url(file:///${encodePath(joinPath(global.lxDataPath, 'theme_images', theme.config.extInfo['--background-image']))})`
}
} else {
themeId = global.lx.appSetting['theme.id'] == 'auto' && shouldUseDarkColors ? 'black' : 'green'