UI: improve the style of code blocks in light theme

This commit is contained in:
oobabooga 2024-07-20 20:32:57 -07:00
parent 9b205f94a4
commit 916d1d8283
5 changed files with 20 additions and 3 deletions

View file

@ -36,7 +36,7 @@ def create_ui():
shared.gradio['toggle_dark_mode'].click(
lambda x: 'dark' if x == 'light' else 'light', gradio('theme_state'), gradio('theme_state')).then(
None, None, None, js='() => {document.getElementsByTagName("body")[0].classList.toggle("dark")}')
None, None, None, js=f'() => {{{ui.dark_theme_js}; toggleDarkMode()}}')
shared.gradio['save_settings'].click(
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(