mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-24 02:50:26 -08:00
Use of a --theme argument for more flexibility
Added possibility to set the theme (light or dark)
This commit is contained in:
parent
8c6a981d5d
commit
665beebc08
3 changed files with 6 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue