Compare commits

..

2 Commits

Author SHA1 Message Date
Oliver
ab15ba5a4f dyn 2025-07-26 15:04:49 -03:00
Oliver
0d6ba0b797 css 2025-07-26 14:22:14 -03:00
3 changed files with 30 additions and 0 deletions

View File

@@ -90,6 +90,26 @@ If its not the right fit, no worries — well refund you 💸.
});
const data = await response.json();
console.log("12344")
const statusDiv = document.getElementById('cw-status');
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');

View File

@@ -18,6 +18,7 @@
<img src="logo.svg" alt="Logo" />
</div>
<div class="header">Kundenservice</div>
<div id="cw-status"></div>
<div id="cw-chatMessages"></div>
<form id="cw-chatForm" autocomplete="off">
<input type="text" id="cw-chatInput" placeholder="Type your message..." required autocomplete="off" />

View File

@@ -364,6 +364,15 @@ footer a:hover {
}
/* Header */
#cw-status {
padding: 10px 10px;
background-color: #f0f0f0;
border-bottom: 1px solid #ddd;
max-height: 0;
overflow: hidden;
transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
}
#cw-chatWidget .header {
background-color: #0070c0;
color: white;