Remove unnecessary chat.js (#3445)

This commit is contained in:
missionfloyd 2023-08-03 22:58:37 -06:00 committed by GitHub
parent 4b3384e353
commit 2336b75d92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 8 deletions

View File

@ -26,7 +26,6 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
#extensions { #extensions {
padding: 0; padding: 0;
padding: 0;
} }
#gradio-chatbot { #gradio-chatbot {
@ -46,6 +45,12 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
min-width: 0 !important; min-width: 0 !important;
} }
#main > :first-child, #extensions {
max-width: 800px;
margin-left: auto;
margin-right: auto;
}
@media screen and (max-width: 688px) { @media screen and (max-width: 688px) {
#main { #main {
padding: 0px; padding: 0px;

View File

@ -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");

View File

@ -13,8 +13,6 @@ with open(Path(__file__).resolve().parent / '../css/chat.css', 'r') as f:
chat_css = f.read() chat_css = f.read()
with open(Path(__file__).resolve().parent / '../css/main.js', 'r') as f: with open(Path(__file__).resolve().parent / '../css/main.js', 'r') as f:
main_js = f.read() 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: with open(Path(__file__).resolve().parent / '../css/save_files.js', 'r') as f:
save_files_js = f.read() save_files_js = f.read()

View File

@ -597,7 +597,7 @@ def create_interface():
# css/js strings # css/js strings
css = ui.css if not shared.is_chat() else ui.css + ui.chat_css 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') css += apply_extensions('css')
js += apply_extensions('js') js += apply_extensions('js')