dyn
This commit is contained in:
@@ -90,15 +90,26 @@ If it’s not the right fit, no worries — we’ll refund you 💸.
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
console.log("12344")
|
||||
const statusDiv = document.getElementById('cw-status');
|
||||
if (data.status) {
|
||||
statusDiv.innerHTML = data.status;
|
||||
statusDiv.style.maxHeight = statusDiv.scrollHeight + 'px';
|
||||
statusDiv.style.padding = '10px';
|
||||
} else {
|
||||
statusDiv.style.maxHeight = '0';
|
||||
statusDiv.style.padding = '0 10px';
|
||||
}
|
||||
console.log("ASS")
|
||||
console.log(data)
|
||||
if (data.status) {
|
||||
statusDiv.innerHTML = data.status;
|
||||
|
||||
// Wait one frame to ensure DOM is updated
|
||||
requestAnimationFrame(() => {
|
||||
|
||||
statusDiv.style.padding = '10px';
|
||||
statusDiv.style.maxHeight = statusDiv.scrollHeight + 'px';
|
||||
});
|
||||
} else {
|
||||
statusDiv.style.maxHeight = '0';
|
||||
statusDiv.style.padding = '0 10px';
|
||||
}
|
||||
|
||||
|
||||
|
||||
appendMessage(data.output, 'bot');
|
||||
} catch (error) {
|
||||
appendMessage('Fehler beim Verbinden mit dem Server. Bitte versuchen Sie es später erneut.', 'bot');
|
||||
|
||||
Reference in New Issue
Block a user