Remove extra space in --chat-buttons

This commit is contained in:
oobabooga 2023-09-15 20:56:30 -07:00
parent 2ad6ca8874
commit 52c4fb75ff
2 changed files with 5 additions and 2 deletions

View File

@ -216,6 +216,8 @@ for(i = 0; i < textareaElements.length; i++) {
//------------------------------------------------ //------------------------------------------------
// Improve the looks of the chat input field // Improve the looks of the chat input field
//------------------------------------------------ //------------------------------------------------
let isOld = document.querySelectorAll('.old-ui').length > 0;
document.getElementById('chat-input').parentNode.style.background = 'transparent'; document.getElementById('chat-input').parentNode.style.background = 'transparent';
document.getElementById('chat-input').parentNode.style.border = 'none'; document.getElementById('chat-input').parentNode.style.border = 'none';
document.getElementById('chat-input').parentElement.parentElement.style.minWidth = 0; document.getElementById('chat-input').parentElement.parentElement.style.minWidth = 0;
@ -224,7 +226,7 @@ document.getElementById('stop').parentElement.parentElement.style.minWidth = 0;
document.getElementById('stop').parentElement.parentElement.style.display = 'flex'; document.getElementById('stop').parentElement.parentElement.style.display = 'flex';
document.getElementById('stop').parentElement.parentElement.style.flexDirection = 'column-reverse'; document.getElementById('stop').parentElement.parentElement.style.flexDirection = 'column-reverse';
document.getElementById('stop').parentElement.parentElement.style.paddingBottom = '3px'; document.getElementById('stop').parentElement.parentElement.style.paddingBottom = '3px';
document.getElementById('stop').parentElement.parentElement.parentElement.style.paddingBottom = '20px'; document.getElementById('stop').parentElement.parentElement.parentElement.style.paddingBottom = isOld ? '0px' : '20px';
document.getElementById('stop').parentElement.parentElement.style.flex = '0 0 auto'; document.getElementById('stop').parentElement.parentElement.style.flex = '0 0 auto';

View File

@ -1,5 +1,6 @@
const belowChatInput = document.querySelectorAll("#chat-tab > div > :nth-child(n+2), #extensions"); const belowChatInput = document.querySelectorAll("#chat-tab > div > :nth-child(n+2), #extensions");
const chatParent = document.querySelector(".chat-parent"); const chatParent = document.querySelector(".chat-parent");
let isOld = document.querySelectorAll('.old-ui').length > 0;
function toggle_controls(value) { function toggle_controls(value) {
if (value) { if (value) {
@ -8,7 +9,7 @@ function toggle_controls(value) {
}); });
chatParent.classList.remove("bigchat"); chatParent.classList.remove("bigchat");
document.getElementById('stop').parentElement.parentElement.parentElement.style.paddingBottom = '20px'; document.getElementById('stop').parentElement.parentElement.parentElement.style.paddingBottom = isOld ? '0px' : '20px';
document.getElementById('show-controls').parentNode.parentNode.style.paddingBottom = '115px'; document.getElementById('show-controls').parentNode.parentNode.style.paddingBottom = '115px';
} else { } else {
belowChatInput.forEach(element => { belowChatInput.forEach(element => {