Lots of fix

Can now add new api key again, and some minor bugs
This commit is contained in:
2024-08-14 17:52:30 +02:00
parent 4dca94b1ee
commit edd5c58a7b
20 changed files with 214 additions and 165 deletions
+5 -3
View File
@@ -38,6 +38,7 @@
<script>
var textareaControl = document.getElementById('textarea-control');
const textarea = document.getElementById('chat-input-textarea');
// Every 0.01s check if the text area have htmx-request class, if yes, add the class is-loading
setInterval(function () {
@@ -49,8 +50,10 @@
} else {
textareaControl.classList.remove('is-loading');
}
toggleSendButton();
}, 10);
if (document.getElementById('chat-input-textarea') != null ) {
toggleSendButton();
}
}, 100);
function updateIcons() {
if (window.innerWidth < 450) {
@@ -90,7 +93,6 @@
}
});
const textarea = document.querySelector('#chat-input-textarea');
textarea.addEventListener('keydown', handleTextareaKeydown);
document.addEventListener('htmx:afterSwap', toggleSendButton)