未验证 提交 74608300 编写于 作者: A AUTOMATIC1111 提交者: GitHub

Merge pull request #7093 from Shondoit/fix-dark-mode

Fix dark mode
......@@ -1686,11 +1686,11 @@ def reload_javascript():
if cmd_opts.theme is not None:
inline += f"set_theme('{cmd_opts.theme}');"
head += f'<script type="text/javascript">{inline}</script>\n'
for script in modules.scripts.list_scripts("javascript", ".js"):
head += f'<script type="text/javascript" src="file={script.path}"></script>\n'
head += f'<script type="text/javascript">{inline}</script>\n'
def template_response(*args, **kwargs):
res = shared.GradioTemplateResponseOriginal(*args, **kwargs)
res.body = res.body.replace(b'</head>', f'{head}</head>'.encode("utf8"))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册