aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui.py
diff options
context:
space:
mode:
authorMichoko <michoko@hotmail.com>2022-10-17 09:05:05 +0000
committerMichoko <michoko@hotmail.com>2022-10-17 09:05:05 +0000
commit8c6a981d5d9ef30381ac2327460285111550acbc (patch)
treed32072df61e6b336dc4d8f771668df0194809b0d /modules/ui.py
parentcccc5a20fce4bde9a4299f8790366790735f1d05 (diff)
downloadstable-diffusion-webui-gfx803-8c6a981d5d9ef30381ac2327460285111550acbc.tar.gz
stable-diffusion-webui-gfx803-8c6a981d5d9ef30381ac2327460285111550acbc.tar.bz2
stable-diffusion-webui-gfx803-8c6a981d5d9ef30381ac2327460285111550acbc.zip
Added dark mode switch
Launch the UI in dark mode with the --dark-mode switch
Diffstat (limited to 'modules/ui.py')
-rw-r--r--modules/ui.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/ui.py b/modules/ui.py
index 43dc88fc..a0cd052e 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -1783,6 +1783,8 @@ for filename in sorted(os.listdir(jsdir)):
with open(os.path.join(jsdir, filename), "r", encoding="utf8") as jsfile:
javascript += f"\n<script>{jsfile.read()}</script>"
+if cmd_opts.dark_mode:
+ javascript += "\n<script>go_dark_mode();</script>\n"
if 'gradio_routes_templates_response' not in globals():
def template_response(*args, **kwargs):