From 0fe36370c6dd29013c89e9b6fbea338488617853 Mon Sep 17 00:00:00 2001 From: sverben <59171289+sverben@users.noreply.github.com> Date: Fri, 3 May 2024 18:06:15 +0200 Subject: [PATCH] feat: download csv --- .../components/core/popups/Windowed.svelte | 8 +++-- .../core/popups/popups/SerialMonitor.svelte | 30 ++++++++++++++++++- src/lib/state/workspace.svelte.ts | 5 +++- 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/src/lib/components/core/popups/Windowed.svelte b/src/lib/components/core/popups/Windowed.svelte index 545ba9a..ba55a9f 100644 --- a/src/lib/components/core/popups/Windowed.svelte +++ b/src/lib/components/core/popups/Windowed.svelte @@ -10,10 +10,11 @@ import type { Writable } from "svelte/store"; interface Props { title: string; content: Snippet; + actions?: Snippet; } const state = getContext>("state"); -const { content, title }: Props = $props(); +const { content, actions, title }: Props = $props(); let x: number; let y: number; @@ -53,7 +54,10 @@ onDestroy(() => {
{title}
- +
+ + {#if actions}{@render actions()}{/if} +
{@render content()}
diff --git a/src/lib/components/core/popups/popups/SerialMonitor.svelte b/src/lib/components/core/popups/popups/SerialMonitor.svelte index de20206..1590ef1 100644 --- a/src/lib/components/core/popups/popups/SerialMonitor.svelte +++ b/src/lib/components/core/popups/popups/SerialMonitor.svelte @@ -1,8 +1,11 @@ +{#snippet actions()} + + +{/snippet} {#snippet content()}
{#each $log as item (item.id)} @@ -49,7 +77,7 @@ function send(event: SubmitEvent) { {/snippet} - +