mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
Fix: Background Image fix for dark theme loading change. (#8292)
## Summary The variable whose name implied it was just an image URL bundled other background pieces. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8292-Fix-Background-Image-fix-for-dark-theme-loading-change-2f26d73d36508177ae7bc24ae3cb027b) by [Unito](https://www.unito.io)
This commit is contained in:
10
index.html
10
index.html
@@ -13,9 +13,17 @@
|
|||||||
<style>
|
<style>
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
body {
|
body {
|
||||||
background-color: #202020;
|
/* Setting it early for background during load */
|
||||||
|
--bg-color: #202020;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
body {
|
||||||
|
background-color: var(--bg-color);
|
||||||
|
background-image: var(--bg-img);
|
||||||
|
background-position: center;
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<link rel="manifest" href="manifest.json">
|
<link rel="manifest" href="manifest.json">
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -11,5 +11,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"theme_color": "#000000"
|
"background_color": "#172dd7",
|
||||||
|
"theme_color": "#f0ff41"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,10 +222,7 @@ export const useColorPaletteService = () => {
|
|||||||
|
|
||||||
const backgroundImage = settingStore.get('Comfy.Canvas.BackgroundImage')
|
const backgroundImage = settingStore.get('Comfy.Canvas.BackgroundImage')
|
||||||
if (backgroundImage) {
|
if (backgroundImage) {
|
||||||
rootStyle.setProperty(
|
rootStyle.setProperty('--bg-img', `url('${backgroundImage}')`)
|
||||||
'--bg-img',
|
|
||||||
`url('${backgroundImage}') no-repeat center /cover`
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
rootStyle.removeProperty('--bg-img')
|
rootStyle.removeProperty('--bg-img')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user