Skip to content

Commit 142cc78

Browse files
reset
1 parent f824fad commit 142cc78

File tree

2 files changed

+50
-14
lines changed

2 files changed

+50
-14
lines changed

apps/desktop/src/routes/(window-chrome)/settings/experimental.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createResource, createSignal, Show } from "solid-js";
1+
import { createResource, Show } from "solid-js";
22
import { createStore } from "solid-js/store";
33

44
import { generalSettingsStore } from "~/store";

apps/desktop/src/routes/(window-chrome)/settings/recordings.tsx

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { ProgressCircle } from "@cap/ui-solid";
2-
import { Dialog } from "@kobalte/core/dialog";
32
import Tooltip from "@corvu/tooltip";
43
import {
54
createMutation,
@@ -14,6 +13,7 @@ import { revealItemInDir } from "@tauri-apps/plugin-opener";
1413
import * as shell from "@tauri-apps/plugin-shell";
1514
import { cx } from "cva";
1615
import {
16+
createEffect,
1717
createMemo,
1818
createSignal,
1919
For,
@@ -30,7 +30,6 @@ import {
3030
events,
3131
type RecordingMetaWithMetadata,
3232
type UploadProgress,
33-
type UploadDebugEvent,
3433
} from "~/utils/tauri";
3534

3635
type Recording = {
@@ -139,13 +138,11 @@ export default function Recordings() {
139138

140139
return (
141140
<div class="flex relative flex-col p-4 space-y-4 w-full h-full">
142-
<div class="flex items-center justify-between">
143-
<div class="flex flex-col">
144-
<h2 class="text-lg font-medium text-gray-12">Previous Recordings</h2>
145-
<p class="text-sm text-gray-10">
146-
Manage your recordings and perform actions.
147-
</p>
148-
</div>
141+
<div class="flex flex-col">
142+
<h2 class="text-lg font-medium text-gray-12">Previous Recordings</h2>
143+
<p class="text-sm text-gray-10">
144+
Manage your recordings and perform actions.
145+
</p>
149146
</div>
150147
<Show
151148
when={recordings.data && recordings.data.length > 0}
@@ -320,10 +317,49 @@ function RecordingItem(props: {
320317
</TooltipIconButton>
321318
</Show>
322319
<Show when={mode() === "instant"}>
323-
<InstantModeActions
324-
recording={props.recording}
325-
uploadProgress={props.uploadProgress}
326-
/>
320+
{(_) => {
321+
const reupload = createMutation(() => ({
322+
mutationFn: () =>
323+
commands.uploadExportedVideo(
324+
props.recording.path,
325+
"Reupload",
326+
new Channel<UploadProgress>((progress) => {}),
327+
),
328+
}));
329+
330+
return (
331+
<>
332+
<Show
333+
when={props.uploadProgress || reupload.isPending}
334+
fallback={
335+
<TooltipIconButton
336+
tooltipText="Reupload"
337+
onClick={() => reupload.mutate()}
338+
>
339+
<IconLucideRotateCcw class="size-4" />
340+
</TooltipIconButton>
341+
}
342+
>
343+
<ProgressCircle
344+
variant="primary"
345+
progress={props.uploadProgress || 0}
346+
size="sm"
347+
/>
348+
</Show>
349+
350+
<Show when={props.recording.meta.sharing}>
351+
{(sharing) => (
352+
<TooltipIconButton
353+
tooltipText="Open link"
354+
onClick={() => shell.open(sharing().link)}
355+
>
356+
<IconCapLink class="size-4" />
357+
</TooltipIconButton>
358+
)}
359+
</Show>
360+
</>
361+
);
362+
}}
327363
</Show>
328364
<TooltipIconButton
329365
tooltipText="Open recording bundle"

0 commit comments

Comments
 (0)