- {transcribedText} -
+- When you run a transformation, the results will appear here. -
-+ When you run a transformation, the results will appear here. +
+- import CopyableCode from '$lib/components/CopyableCode.svelte'; + import Copyable from '$lib/components/Copyable.svelte'; import WhisperingButton from '$lib/components/WhisperingButton.svelte'; import { Button } from '$lib/components/ui/button'; import * as Dialog from '$lib/components/ui/dialog'; @@ -38,7 +38,8 @@ {/snippet} From 17ed4a1246512acc46eba7cec982c9c79bbb21c0 Mon Sep 17 00:00:00 2001 From: Braden Wong <13159333+braden-w@users.noreply.github.com> Date: Sat, 25 Jan 2025 10:03:12 -0500 Subject: [PATCH 36/73] feat: updates to template in TranscribedText.svelte --- .../recordings/CopyableTextPopover.svelte | 89 +++++++++---------- .../recordings/TranscribedText.svelte | 10 ++- 2 files changed, 49 insertions(+), 50 deletions(-) diff --git a/apps/app/src/routes/(config)/recordings/CopyableTextPopover.svelte b/apps/app/src/routes/(config)/recordings/CopyableTextPopover.svelte index bf70a08f1..dee9f8a78 100644 --- a/apps/app/src/routes/(config)/recordings/CopyableTextPopover.svelte +++ b/apps/app/src/routes/(config)/recordings/CopyableTextPopover.svelte @@ -1,5 +1,4 @@ -- Transcribed Text - import CopyableCode from '$lib/components/CopyableCode.svelte'; + import Copyable from '$lib/components/Copyable.svelte'; import { LabeledInput, LabeledSelect, @@ -114,13 +114,15 @@ - - diff --git a/apps/app/src/routes/(config)/transformations/-components/RenderTransformationRuns.svelte b/apps/app/src/routes/(config)/transformations/-components/RenderTransformationRuns.svelte index 9adda554a..6002798f3 100644 --- a/apps/app/src/routes/(config)/transformations/-components/RenderTransformationRuns.svelte +++ b/apps/app/src/routes/(config)/transformations/-components/RenderTransformationRuns.svelte @@ -1,5 +1,5 @@ + + + copyTextToClipboardWithToast.mutate( + { label, text: copyableText }, + { onSuccess: () => (hasCopied = true) }, + )} +> + Copy + {#if hasCopied} + diff --git a/apps/app/src/lib/components/Copyable.svelte b/apps/app/src/lib/components/Copyable.svelte index 39f1970a0..9229346d8 100644 --- a/apps/app/src/lib/components/Copyable.svelte +++ b/apps/app/src/lib/components/Copyable.svelte @@ -6,7 +6,7 @@ variants: { variant: { code: 'bg-muted text-muted-foreground font-semibold font-mono', - prose: 'bg-muted text-muted-foreground', + text: 'bg-muted text-muted-foreground', error: 'bg-destructive/10 text-destructive', }, }, @@ -18,13 +18,9 @@+ {:else} + + {/if} + @@ -53,23 +40,10 @@ {label}diff --git a/apps/app/src/lib/query/clipboard/mutations.ts b/apps/app/src/lib/query/clipboard/mutations.ts index f15047cbb..747b2afcb 100644 --- a/apps/app/src/lib/query/clipboard/mutations.ts +++ b/apps/app/src/lib/query/clipboard/mutations.ts @@ -10,13 +10,14 @@ export const useCopyTextToClipboard = () => }, })); +export type CopyToClipboardLabel = 'transcribed text' | 'transcribed text (joined)' | 'code'; export const useCopyTextToClipboardWithToast = () => createMutation(() => ({ mutationFn: async ({ label, text, }: { - label: 'transcribed text' | 'transcribed text (joined)' | 'code'; + label: CopyToClipboardLabel; text: string; }) => { const result = await ClipboardService.setClipboardText(text); From c3dbd82411941760e0ba9d6aa196c98743c3cd22 Mon Sep 17 00:00:00 2001 From: Braden Wong <13159333+braden-w@users.noreply.github.com> Date: Fri, 24 Jan 2025 17:14:18 -0500 Subject: [PATCH 28/73] refactor: CopyToClipboardbutton --- .../components/CopyToClipboardButton.svelte | 5 +- .../recordings/TranscribedText.svelte | 125 ++++++++++-------- 2 files changed, 73 insertions(+), 57 deletions(-) diff --git a/apps/app/src/lib/components/CopyToClipboardButton.svelte b/apps/app/src/lib/components/CopyToClipboardButton.svelte index 7e240f2c9..81e148736 100644 --- a/apps/app/src/lib/components/CopyToClipboardButton.svelte +++ b/apps/app/src/lib/components/CopyToClipboardButton.svelte @@ -1,4 +1,5 @@ --- copyTextToClipboardWithToast.mutate( - { label: 'code', text: copyableText }, - { onSuccess: () => (hasCopied = true) }, - )}> - Copy - {#if hasCopied} - {copyableText} +- {:else} - - {/if} - - - {#snippet child({ props })} - -- {transcribedText} - - {/snippet} -- - -Transcribed Text -- - - -+- - -- {#snippet child({ props })} - -- {text} - - {/snippet} -- -Transcribed Text -{text}-- -(isPopoverOpen = false)}> - Close - -{ - copyTextToClipboardWithToast.mutate( - { - label: 'transcribed text', - text: text, - }, - { onSuccess: () => (isPopoverOpen = false) }, - ); - }} - > - -- Copy Text - - + diff --git a/apps/app/src/routes/(config)/recordings/TranscribedText.svelte b/apps/app/src/routes/(config)/recordings/TranscribedText.svelte index 58b03c309..e513ac05b 100644 --- a/apps/app/src/routes/(config)/recordings/TranscribedText.svelte +++ b/apps/app/src/routes/(config)/recordings/TranscribedText.svelte @@ -1,4 +1,5 @@ -+ {#snippet child({ props })} + ++ {text} + + {/snippet} ++ +Transcribed Text +{text}++ +(isPopoverOpen = false)}> + Close + +{ + copyTextToClipboardWithToast.mutate( + { + label: 'transcribed text', + text: text, + }, + { onSuccess: () => (isPopoverOpen = false) }, + ); + }} + > + ++ Copy Text + + +From 92aa91ef2af4bf3bd321e1c971e1fe728ae01a35 Mon Sep 17 00:00:00 2001 From: Braden Wong <13159333+braden-w@users.noreply.github.com> Date: Sat, 25 Jan 2025 10:03:48 -0500 Subject: [PATCH 37/73] chore: variant=text --- .../-components/RenderTransformationRuns.svelte | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/app/src/routes/(config)/transformations/-components/RenderTransformationRuns.svelte b/apps/app/src/routes/(config)/transformations/-components/RenderTransformationRuns.svelte index 52f123eaf..473199f59 100644 --- a/apps/app/src/routes/(config)/transformations/-components/RenderTransformationRuns.svelte +++ b/apps/app/src/routes/(config)/transformations/-components/RenderTransformationRuns.svelte @@ -79,14 +79,10 @@ {#if expandedRunId === run.id}+ +
{text}-
{text}+
{text}