From ab15ba5a4fef845355dd13d28e71b89ae681155c Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 26 Jul 2025 15:04:49 -0300 Subject: [PATCH] dyn --- public/app.js | 27 +++++++++++++++++++-------- public/style.css | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/public/app.js b/public/app.js index 30ce017..c747580 100644 --- a/public/app.js +++ b/public/app.js @@ -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'); diff --git a/public/style.css b/public/style.css index 21ef6e7..d6f79f0 100644 --- a/public/style.css +++ b/public/style.css @@ -365,7 +365,7 @@ footer a:hover { /* Header */ #cw-status { - padding: 0 10px; + padding: 10px 10px; background-color: #f0f0f0; border-bottom: 1px solid #ddd; max-height: 0;