Make the chat input expand upwards (#3920)

This commit is contained in:
oobabooga 2023-09-14 07:06:42 -03:00 committed by GitHub
parent 6b6af74e14
commit 27dbcc59f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 14 deletions

View file

@ -1,4 +1,4 @@
const belowChatInput = document.querySelectorAll("#chat-tab > div > :nth-child(n+3), #extensions");
const belowChatInput = document.querySelectorAll("#chat-tab > div > :nth-child(n+2), #extensions");
const chatParent = document.getElementById("chat").parentNode.parentNode.parentNode;
function toggle_controls(value) {
@ -9,6 +9,7 @@ function toggle_controls(value) {
chatParent.classList.remove("bigchat");
document.getElementById('stop').parentElement.parentElement.parentElement.style.paddingBottom = '20px';
document.getElementById('show-controls').parentNode.parentNode.style.paddingBottom = '115px';
} else {
belowChatInput.forEach(element => {
element.style.display = "none";
@ -16,5 +17,6 @@ function toggle_controls(value) {
chatParent.classList.add("bigchat");
document.getElementById('stop').parentElement.parentElement.parentElement.style.paddingBottom = '0px';
document.getElementById('show-controls').parentNode.parentNode.style.paddingBottom = '95px';
}
}