From 567c9438c33b125b507ecb53f0d248b720fdb5e9 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Fri, 11 Sep 2026 00:07:23 +0200 Subject: [PATCH] Use a compact single-line chat composer --- packages/viewer/src/lib/ChatPanel.svelte | 45 +++++++++++++----------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/packages/viewer/src/lib/ChatPanel.svelte b/packages/viewer/src/lib/ChatPanel.svelte index b5c3822..640f1db 100644 --- a/packages/viewer/src/lib/ChatPanel.svelte +++ b/packages/viewer/src/lib/ChatPanel.svelte @@ -106,27 +106,26 @@ {/each} {#if chat.canSend && !chat.disabled} -
{ - event.preventDefault(); - chat.submit(); - }} - > - - + -
+ {:else}

{notice}

{/if} {#if chat.error}{/if} {/if} @@ -208,33 +207,39 @@ .notice { color: #a5bdb0; } - form { + .chat-composer { display: flex; - gap: 10px; - align-items: stretch; + gap: 8px; + align-items: center; } - textarea { + input { flex: 1; min-width: 0; background: #0b211c; color: #f5ebce; border: 1px solid #6d8976; border-radius: 5px; - padding: 10px; + padding: 4px 8px; font: inherit; font-size: 15px; - resize: vertical; } - textarea:focus-visible { + input:focus-visible { outline: 2px solid #e6c780; outline-offset: 2px; } + input, + .chat-send { + box-sizing: border-box; + height: 34px; + line-height: 20px; + } .chat-send { background: #e6c780; color: #142a22; border: 0; border-radius: 5px; - padding: 8px 12px; + padding: 4px 12px; + white-space: nowrap; font-weight: 600; cursor: pointer; }