mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 03:10:21 +00:00
Use of a --theme argument for more flexibility
Added possibility to set the theme (light or dark)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
// various functions for interation with ui.py not large enough to warrant putting them in separate files
|
||||
|
||||
function go_dark_mode(){
|
||||
function set_theme(theme){
|
||||
gradioURL = window.location.href
|
||||
if (!gradioURL.endsWith('?__theme=dark')) {
|
||||
window.location.replace(gradioURL + '?__theme=dark');
|
||||
if (!gradioURL.includes('?__theme=')) {
|
||||
window.location.replace(gradioURL + '?__theme=' + theme);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user