/products (search), product pages with revisions, getting and staying on a revision, retracting; /products/:id/edit; /create and new revisions upload from the browser straight to the catalog with a token from the hub; /library; /catalogs (directory, registering with a once-shown key); /console/catalogs to approve or reject. Every page now sends a nonce-based CSP (proxy.ts), so product descriptions can't run scripts. buttonVariants now merges classes, so outline links get their border. Co-Authored-By: Claude Opus 5.5 <[email protected]>
11 lines
464 B
TypeScript
11 lines
464 B
TypeScript
import { Tag } from "@/components/status";
|
|
|
|
export const membership: Record<string, string> = { open: "Open", approval: "By approval", invite: "Invite only" };
|
|
|
|
/** A catalog's review status: approved, pending or rejected. */
|
|
export function CatalogStatus({ status }: { status: string }) {
|
|
if (status === "approved") return <Tag tone="strong">approved</Tag>;
|
|
if (status === "rejected") return <Tag tone="danger">rejected</Tag>;
|
|
return <Tag>{status}</Tag>;
|
|
}
|