diff options
author | Michoko <michoko@hotmail.com> | 2022-10-17 16:24:24 +0000 |
---|---|---|
committer | Michoko <michoko@hotmail.com> | 2022-10-17 16:24:24 +0000 |
commit | 665beebc0825a6fad410c8252f27f6f6f0bd900b (patch) | |
tree | 1c4d9ddcc19decef0dbf0403eb5de8efa3c71bd3 /modules/ui.py | |
parent | 8c6a981d5d9ef30381ac2327460285111550acbc (diff) | |
download | stable-diffusion-webui-gfx803-665beebc0825a6fad410c8252f27f6f6f0bd900b.tar.gz stable-diffusion-webui-gfx803-665beebc0825a6fad410c8252f27f6f6f0bd900b.tar.bz2 stable-diffusion-webui-gfx803-665beebc0825a6fad410c8252f27f6f6f0bd900b.zip |
Use of a --theme argument for more flexibility
Added possibility to set the theme (light or dark)
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/ui.py b/modules/ui.py index a0cd052e..d41715fa 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1783,8 +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 cmd_opts.theme is not None:
+ javascript += f"\n<script>set_theme('{cmd_opts.theme}');</script>\n"
if 'gradio_routes_templates_response' not in globals():
def template_response(*args, **kwargs):
|