Some checks failed
build-images / web (push) Has been cancelled
vision2026-ci / Python SDK resource tests (push) Has been cancelled
build-images / api (push) Has been cancelled
build-images / worker-gpu (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Has been cancelled
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Has been cancelled
codeql / Analyze (javascript-typescript) (push) Has been cancelled
codeql / Analyze (python) (push) Has been cancelled
perf / API hot-path micro-smoke (budgeted) (push) Has been cancelled
perf / Desktop engine crates (release build check) (push) Has been cancelled
vision2026-ci / API phase modules (ruff + pytest) (push) Has been cancelled
vision2026-ci / Alembic upgrade + drift check (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Has been cancelled
Paid, hosted product at menivor.com, now retired as a company project. Fresh squashed history of the cleaned working tree (secret-scanned, no .env, no customer data, no outreach logs). Built on MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
55 lines
2.0 KiB
TypeScript
55 lines
2.0 KiB
TypeScript
import { Skeleton } from "@/components/ui/skeleton";
|
|
|
|
interface RouteLoadingProps {
|
|
/** What is loading, read to screen readers (e.g. "your reels"). */
|
|
readonly label: string;
|
|
/** Layout of the placeholder body: a card grid, a list, or a single panel. */
|
|
readonly variant?: "grid" | "list" | "panel";
|
|
}
|
|
|
|
const GRID_ITEMS = [0, 1, 2, 3, 4, 5] as const;
|
|
const LIST_ROWS = [0, 1, 2, 3, 4] as const;
|
|
|
|
/**
|
|
* Shared route-segment loading state. Reserves the app header, a page title
|
|
* and a body shaped like the page, so navigation shows structure immediately
|
|
* instead of a blank screen while the segment's data streams in.
|
|
*/
|
|
export function RouteLoading({ label, variant = "grid" }: RouteLoadingProps) {
|
|
return (
|
|
<div aria-busy="true" aria-live="polite">
|
|
<span className="sr-only">Loading {label}…</span>
|
|
<div className="border-b border-border" aria-hidden>
|
|
<div className="container flex h-16 items-center justify-between gap-3">
|
|
<Skeleton className="h-5 w-28" />
|
|
<div className="flex items-center gap-2">
|
|
<Skeleton className="h-9 w-24" />
|
|
<Skeleton className="h-9 w-9 rounded-full" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<main className="container space-y-6 py-8" aria-hidden>
|
|
<div className="space-y-2">
|
|
<Skeleton className="h-8 w-56" />
|
|
<Skeleton className="h-4 w-80 max-w-full" />
|
|
</div>
|
|
{variant === "grid" ? (
|
|
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
|
{GRID_ITEMS.map((i) => (
|
|
<Skeleton key={i} className="h-40 w-full" />
|
|
))}
|
|
</div>
|
|
) : null}
|
|
{variant === "list" ? (
|
|
<div className="space-y-3">
|
|
{LIST_ROWS.map((i) => (
|
|
<Skeleton key={i} className="h-16 w-full" />
|
|
))}
|
|
</div>
|
|
) : null}
|
|
{variant === "panel" ? <Skeleton className="h-[28rem] w-full" /> : null}
|
|
</main>
|
|
</div>
|
|
);
|
|
}
|