Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(web): pass video source through caps list query

Richie McIlroya88584a5a7e8
diff --git a/apps/web/app/(org)/dashboard/caps/Caps.tsx b/apps/web/app/(org)/dashboard/caps/Caps.tsx
index 418945982..f96606d3f 100644
--- a/apps/web/app/(org)/dashboard/caps/Caps.tsx
+++ b/apps/web/app/(org)/dashboard/caps/Caps.tsx
@@ -1,5 +1,6 @@
"use client";
+import type { videos as videosSchema } from "@cap/database/schema";
import type { VideoMetadata } from "@cap/database/types";
import { Button } from "@cap/ui";
import type { SpaceRuleSource, ViewerSettingKey } from "@cap/web-backend";
@@ -52,6 +53,8 @@ export type VideoData = {
}[];
ownerName: string;
metadata?: VideoMetadata;
+ source: typeof videosSchema.$inferSelect.source;
+ isScreenshot: boolean;
hasPassword: boolean;
hasInheritedPassword?: boolean;
inheritedPasswordSources?: SpaceRuleSource[];
diff --git a/apps/web/app/(org)/dashboard/caps/page.tsx b/apps/web/app/(org)/dashboard/caps/page.tsx
index 91a52c00e..c49ee5be3 100644
--- a/apps/web/app/(org)/dashboard/caps/page.tsx
+++ b/apps/web/app/(org)/dashboard/caps/page.tsx
@@ -157,6 +157,8 @@ export default async function CapsPage(props: PageProps<"/dashboard/caps">) {
name: videos.name,
createdAt: videos.createdAt,
metadata: videos.metadata,
+ source: videos.source,
+ isScreenshot: videos.isScreenshot,
duration: videos.duration,
public: videos.public,
totalComments: sql<number>`COUNT(DISTINCT CASE WHEN ${comments.type} = 'text' THEN ${comments.id} END)`,
@@ -206,6 +208,8 @@ export default async function CapsPage(props: PageProps<"/dashboard/caps">) {
videos.name,
videos.createdAt,
videos.metadata,
+ videos.source,
+ videos.isScreenshot,
videos.duration,
videos.public,
videos.password,