diff --git a/css/chat.css b/css/chat.css index ad76f5cc..67bbe512 100644 --- a/css/chat.css +++ b/css/chat.css @@ -26,7 +26,6 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { #extensions { padding: 0; - padding: 0; } #gradio-chatbot { @@ -46,6 +45,12 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { min-width: 0 !important; } +#main > :first-child, #extensions { + max-width: 800px; + margin-left: auto; + margin-right: auto; +} + @media screen and (max-width: 688px) { #main { padding: 0px; diff --git a/css/chat.js b/css/chat.js deleted file mode 100644 index e304f125..00000000 --- a/css/chat.js +++ /dev/null @@ -1,4 +0,0 @@ -document.getElementById("main").childNodes[0].style = "max-width: 800px; margin-left: auto; margin-right: auto"; -document.getElementById("extensions").style.setProperty("max-width", "800px"); -document.getElementById("extensions").style.setProperty("margin-left", "auto"); -document.getElementById("extensions").style.setProperty("margin-right", "auto"); diff --git a/modules/ui.py b/modules/ui.py index df36a331..eed2ef66 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -13,8 +13,6 @@ with open(Path(__file__).resolve().parent / '../css/chat.css', 'r') as f: chat_css = f.read() with open(Path(__file__).resolve().parent / '../css/main.js', 'r') as f: main_js = f.read() -with open(Path(__file__).resolve().parent / '../css/chat.js', 'r') as f: - chat_js = f.read() with open(Path(__file__).resolve().parent / '../css/save_files.js', 'r') as f: save_files_js = f.read() diff --git a/server.py b/server.py index 10ea4ece..d1a23bbe 100644 --- a/server.py +++ b/server.py @@ -597,7 +597,7 @@ def create_interface(): # css/js strings css = ui.css if not shared.is_chat() else ui.css + ui.chat_css - js = ui.main_js if not shared.is_chat() else ui.main_js + ui.chat_js + js = ui.main_js css += apply_extensions('css') js += apply_extensions('js')