fix: 修复主题背景图片URL构建逻辑
This commit is contained in:
@@ -263,7 +263,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']))})`
|
||||
: `url(${encodePath(joinPath(global.lxDataPath, 'theme_images', theme.config.extInfo['--background-image']))})`
|
||||
}
|
||||
} else {
|
||||
themeId = global.lx.appSetting['theme.id'] == 'auto' && shouldUseDarkColors ? 'black' : 'green'
|
||||
|
||||
@@ -18,7 +18,7 @@ export const assertApiSupport = (source: LX.Source): boolean => {
|
||||
export const buildBgUrl = (originUrl: string, dataPath: string): string => {
|
||||
return isUrl(originUrl)
|
||||
? `url(${originUrl})`
|
||||
: `url(file:///${encodePath(joinPath(dataPath, originUrl).replaceAll('\\', '/'))})`
|
||||
: `url(${encodePath(joinPath(dataPath, originUrl).replaceAll('\\', '/'))})`
|
||||
}
|
||||
|
||||
export const getThemes = (callback: (themeInfo: LX.ThemeInfo) => void) => {
|
||||
|
||||
Reference in New Issue
Block a user