From 00535152865899791d2ea7e26e74620cb5d9d5de Mon Sep 17 00:00:00 2001 From: Samuel Andert Date: Sat, 22 Jul 2023 16:08:00 +0200 Subject: [PATCH] Added dynamic component rendering attached to message with the @app: command --- src/lib/components/Composite.svelte | 2 +- src/lib/components/MessageInput.svelte | 57 +++++++++++++++++++------- src/lib/components/Messages.svelte | 23 ++++++++--- src/lib/services/messages.ts | 6 ++- 4 files changed, 66 insertions(+), 22 deletions(-) diff --git a/src/lib/components/Composite.svelte b/src/lib/components/Composite.svelte index dfe6959..2da1b00 100644 --- a/src/lib/components/Composite.svelte +++ b/src/lib/components/Composite.svelte @@ -11,7 +11,7 @@ } -
+
{#each componentsData.children as component (component.id)} {#await getComponent(component.componentName) then Component} {#if Component} diff --git a/src/lib/components/MessageInput.svelte b/src/lib/components/MessageInput.svelte index fc28004..99a5704 100644 --- a/src/lib/components/MessageInput.svelte +++ b/src/lib/components/MessageInput.svelte @@ -1,47 +1,76 @@ -