mirror of
https://github.com/Physton/sd-webui-prompt-all-in-one.git
synced 2026-04-30 19:21:43 +00:00
Fixing theme-related issues
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -400,7 +400,9 @@ export default {
|
||||
common.loadCSS('main.min.css', 'physton-prompt-main', true)
|
||||
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const theme = urlParams.get("__theme")
|
||||
let theme = urlParams.get("__theme") || 'dark'
|
||||
// 如果不是 dark 和 light,默认设置为 dark
|
||||
theme = ['dark', 'light'].includes(theme) ? theme : 'dark'
|
||||
if (!common.gradioApp().classList.contains(theme)) {
|
||||
common.gradioApp().classList.add(theme)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user