From 31543d778d42ce957444e2bb5d0c7e9d2a49d1b6 Mon Sep 17 00:00:00 2001 From: "Thomas G. Lopes" <26071571+TGlide@users.noreply.github.com> Date: Tue, 17 Jun 2025 15:38:07 +0100 Subject: [PATCH] styled textarea --- src/routes/chat/+layout.svelte | 226 +++++++++++++++++++-------------- 1 file changed, 128 insertions(+), 98 deletions(-) diff --git a/src/routes/chat/+layout.svelte b/src/routes/chat/+layout.svelte index 2fe1d9c..93997e1 100644 --- a/src/routes/chat/+layout.svelte +++ b/src/routes/chat/+layout.svelte @@ -180,7 +180,11 @@ return suggestions.length > 0 ? suggestions : undefined; }); - const popover = new Popover(); + const popover = new Popover({ + floatingConfig: { + computePosition: { placement: 'top' }, + }, + }); function completeRule(rule: Doc<'user_rules'>) { if (!textarea) return; @@ -252,6 +256,9 @@ } const textareaSize = new ElementSize(() => textarea); + + let textareaWrapper = $state(); + const wrapperSize = new ElementSize(() => textareaWrapper); @@ -278,11 +285,12 @@ >
{#each templateConversations as group, index (group.key)} + {@const IconComponent = group.icon} {#if group.conversations.length > 0}
0}>

- {#if group.icon} - + {#if IconComponent} + {/if} {group.label}

@@ -395,115 +403,137 @@
-
+
{@render children()}
- - -
{ - e.preventDefault(); - handleSubmit(); - }} - bind:this={form} - > - {#if suggestedRules} -
-
- {#each suggestedRules as rule, i (rule._id)} - + {/each} +
+
+ {/if} +
+
+ + + +
+
+
+ - {/each} + + +
+
+ +
- {/if} - - - - -
-
- - Crafted by wizards. - - - Source on - +
+ + +