Commit 12e79c3d by michaelpastushkov

fix

parent b9350974
......@@ -198,9 +198,11 @@
position: fixed;
right: 1rem;
bottom: calc(var(--footer-h) + .75rem + var(--composer-h));
/* hover above composer+footer */
z-index: 1100;
/* above composer/footer */
display: none;
/* hidden initially */
align-items: center;
justify-content: center;
border: 1px solid #ced4da;
......@@ -252,7 +254,7 @@
<div class="composer py-3">
<div class="container">
<form id="promptForm" class="d-flex flex-column gap-2">
<!-- Single row: textarea + Go/Stop (scroll button removed from here) -->
<!-- Single row: textarea + Go/Stop -->
<div class="composer-row">
<textarea id="inputText" class="form-control" rows="1" placeholder=""></textarea>
<button id="goBtn" class="btn btn-primary" type="submit"></button>
......@@ -265,7 +267,7 @@
<!-- Fixed, non-scrollable footer -->
<footer id="disclaimer"></footer>
<!-- Floating scroll-to-bottom button -->
<!-- Floating scroll button -->
<button id="scrollDownBtn" type="button" aria-label="Scroll down" title="Scroll down">
<svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
<path
......@@ -381,6 +383,7 @@
function updateScrollButton() {
const needs = isOverflowingAny() && !atBottom();
// hidden initially (no overflow) and whenever you’re at the bottom
scrollDownBtn.style.display = needs ? 'inline-flex' : 'none';
}
......@@ -452,7 +455,7 @@
const { value, done } = await reader.read();
if (done) break;
const chunk = decoder.decode(value, { stream: true });
rawMarkdown += chunk; // append chunk
rawMarkdown += chunk; // append streamed chunk
flush();
}
flush();
......@@ -504,7 +507,7 @@
try { await fetch('/api/clear', { method: 'GET' }); } catch (_) { }
await loadLocale(CURRENT_LOCALE);
inputText.focus();
updateScrollButton(); // initial
updateScrollButton(); // initial -> hidden if no overflow
});
</script>
</body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment