Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(desktop): show clip count on recording cards and list

Richie McIlroy9d7fc73f37fe
diff --git a/apps/desktop/src/routes/(window-chrome)/new-main/TargetCard.tsx b/apps/desktop/src/routes/(window-chrome)/new-main/TargetCard.tsx
index effcd5d53..9ab219e13 100644
--- a/apps/desktop/src/routes/(window-chrome)/new-main/TargetCard.tsx
+++ b/apps/desktop/src/routes/(window-chrome)/new-main/TargetCard.tsx
@@ -359,6 +359,11 @@ export default function TargetCard(props: TargetCardProps) {
</Show>
<div class="absolute inset-0 border opacity-60 pointer-events-none border-black/5" />
<div class="absolute inset-x-0 bottom-0 h-10 bg-linear-to-t to-transparent pointer-events-none from-black/40" />
+ <Show when={(recordingTarget()?.clip_count ?? 0) > 1}>
+ <div class="absolute left-1 top-1 rounded-full bg-black/55 px-1.5 py-0.5 text-[10px] font-medium text-white">
+ {recordingTarget()?.clip_count} clips
+ </div>
+ </Show>
<Show when={recordingFailed() || recordingUploadFailed()}>
<div class="absolute inset-0 flex items-center justify-center bg-black/75">
<div class="flex items-center gap-1 px-1.5 py-0.5 rounded-sm bg-red-9/20 text-red-11">
diff --git a/apps/desktop/src/routes/(window-chrome)/settings/recordings.tsx b/apps/desktop/src/routes/(window-chrome)/settings/recordings.tsx
index 9257c7cad..84b2724b1 100644
--- a/apps/desktop/src/routes/(window-chrome)/settings/recordings.tsx
+++ b/apps/desktop/src/routes/(window-chrome)/settings/recordings.tsx
@@ -382,6 +382,12 @@ function RecordingItem(props: {
<p>{firstLetterUpperCase()}</p>
</div>
+ <Show when={props.recording.meta.clip_count > 1}>
+ <div class="px-2 py-0.5 flex items-center font-medium text-[11px] text-gray-12 rounded-full w-fit bg-gray-4">
+ <p>{props.recording.meta.clip_count} clips</p>
+ </div>
+ </Show>
+
<Show when={props.recording.meta.status.status === "InProgress"}>
<div
class={cx(