Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/web/__tests__/unit/dashboard-video-count.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Database, ImageUploads, Spaces } from "@cap/web-backend";
import { Effect, Layer } from "effect";
import { beforeEach, describe, expect, it, vi } from "vitest";
import CapsPage from "@/app/(org)/dashboard/caps/page";
import SharedCapsPage from "@/app/(org)/dashboard/spaces/[spaceId]/page";
import CapsPage from "@/app/(org)/dashboard/caps/(list)/page";
import SharedCapsPage from "@/app/(org)/dashboard/spaces/[spaceId]/(space)/page";

const mocks = vi.hoisted(() => ({ query: vi.fn() }));

Expand Down
2 changes: 1 addition & 1 deletion apps/web/__tests__/unit/space-page-round-trips.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { drizzle } from "drizzle-orm/mysql-proxy";
import { Effect, Layer, Option } from "effect";
import { beforeEach, describe, expect, it, vi } from "vitest";
import SharedCapsPage from "@/app/(org)/dashboard/spaces/[spaceId]/page";
import SharedCapsPage from "@/app/(org)/dashboard/spaces/[spaceId]/(space)/page";
import { getVideosByFolderId } from "@/lib/folder";
import {
Database as BackendDatabase,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import type { Metadata } from "next";
import { redirect } from "next/navigation";
import { seedThumbnailUrls } from "@/lib/seeded-thumbnails";
import { runPromise } from "@/lib/server";
import { Caps } from "./Caps";
import { Caps } from "../Caps";

export const metadata: Metadata = {
title: "My Caps — Cap",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import DeleteOrg from "./components/DeleteOrg";
import { OrganizationDetailsCard } from "./components/OrganizationDetailsCard";
import DeleteOrg from "../components/DeleteOrg";
import { OrganizationDetailsCard } from "../components/OrganizationDetailsCard";

export function GeneralPage() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
"use client";

import { SkeletonPage } from "@cap/ui";

export default function Loading() {
return (
<SkeletonPage
customSkeleton={(Skeleton) => (
<div className="flex flex-col gap-6">
<div className="flex flex-col gap-5 p-6 w-full rounded-2xl border min-h-fit bg-gray-3 border-gray-4">
<div className="space-y-2">
<Skeleton
baseColor="var(--gray-4)"
highlightColor="var(--gray-5)"
className="h-[24px] w-[120px]"
/>
<Skeleton
baseColor="var(--gray-4)"
highlightColor="var(--gray-5)"
className="h-[16px] w-[280px] max-w-full"
/>
</div>
<Skeleton
baseColor="var(--gray-4)"
highlightColor="var(--gray-5)"
className="h-[72px] w-full rounded-xl"
/>
</div>
<div className="flex flex-col gap-5 p-6 w-full rounded-2xl border min-h-fit bg-gray-3 border-gray-4">
<div className="space-y-2">
<Skeleton
baseColor="var(--gray-4)"
highlightColor="var(--gray-5)"
className="h-[24px] w-[100px]"
/>
<Skeleton
baseColor="var(--gray-4)"
highlightColor="var(--gray-5)"
className="h-[16px] w-[260px] max-w-full"
/>
</div>
<div className="flex flex-col gap-3">
{Array(5)
.fill(0)
.map((_, index) => (
<Skeleton
key={index.toString()}
baseColor="var(--gray-4)"
highlightColor="var(--gray-5)"
className="h-[40px] w-full rounded-lg"
/>
))}
</div>
</div>
</div>
)}
/>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
"use client";

import { SkeletonPage } from "@cap/ui";

export default function Loading() {
return (
<SkeletonPage
customSkeleton={(Skeleton) => (
<div className="flex flex-col gap-6">
<div className="flex flex-col flex-1 gap-5 p-6 w-full rounded-2xl border min-h-fit bg-gray-3 border-gray-4">
<div className="space-y-2">
<Skeleton
baseColor="var(--gray-4)"
highlightColor="var(--gray-5)"
className="h-[24px] w-[200px]"
/>
<Skeleton
baseColor="var(--gray-4)"
highlightColor="var(--gray-5)"
className="h-[16px] w-[340px] max-w-full"
/>
</div>
<div className="grid gap-5 lg:grid-cols-2 lg:gap-x-20">
{["source", "destination"].map((column) => (
<div key={column} className="min-w-0">
<Skeleton
baseColor="var(--gray-4)"
highlightColor="var(--gray-5)"
className="h-[16px] w-[140px] mb-3"
/>
<Skeleton
baseColor="var(--gray-4)"
highlightColor="var(--gray-5)"
className="h-[44px] w-full rounded-xl"
/>
<Skeleton
baseColor="var(--gray-4)"
highlightColor="var(--gray-5)"
className="h-[44px] w-full rounded-xl mt-3"
/>
<Skeleton
baseColor="var(--gray-4)"
highlightColor="var(--gray-5)"
className="h-72 w-full rounded-lg mt-2"
/>
</div>
))}
</div>
</div>
</div>
)}
/>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "../(general)/loading";
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "../(general)/loading";
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "../(general)/loading";
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import type { Metadata } from "next";
import { notFound } from "next/navigation";
import { seedThumbnailUrls } from "@/lib/seeded-thumbnails";
import { runPromise } from "@/lib/server";
import { SharedCaps } from "./SharedCaps";
import { SharedCaps } from "../SharedCaps";

export const metadata: Metadata = {
title: "Shared Caps — Cap",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import type { FolderDataType } from "../../caps/components/Folder";
import { FoldersSection } from "../../caps/components/FoldersSection";
import { NewFolderDialog } from "../../caps/components/NewFolderDialog";
import { SelectedCapsBar } from "../../caps/components/SelectedCapsBar";
import type { SpaceMemberData } from "./(space)/page";
import { AddVideosDialog } from "./components/AddVideosDialog";
import { AddVideosToOrganizationDialog } from "./components/AddVideosToOrganizationDialog";
import { EmptySharedCapState } from "./components/EmptySharedCapState";
Expand All @@ -47,7 +48,6 @@ import {
type OrganizationMemberData,
} from "./components/OrganizationIndicator";
import { SharedCapCard } from "./components/SharedCapCard";
import type { SpaceMemberData } from "./page";

type SharedVideoData = {
id: Video.VideoId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import {
spaceRoleLabel,
} from "@/lib/permissions/roles";
import { useDashboardContext } from "../../../Contexts";
import type { SpaceMemberData } from "../(space)/page";
import { setSpaceMembers } from "../actions";
import type { SpaceMemberData } from "../page";
import { MemberSelect } from "./MemberSelect";

type MembersIndicatorProps = {
Expand Down
Loading