Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a deterministic verification core: clinical-trial claims checked against ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI recomputed in code, oracle-tested), code-enforced exact-span grounding, and multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing at scale (unpdf + Docling), agentic workflows, Claude Science connector, compliance/audit, billing, public API, and more. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
78 lines
2.3 KiB
TypeScript
78 lines
2.3 KiB
TypeScript
"use client";
|
|
|
|
import Link from "next/link";
|
|
import type { ReferenceLibraryDto } from "../api";
|
|
|
|
type ExportFormat = "bibtex" | "ris" | "csv";
|
|
|
|
interface LibraryDetailHeaderProps {
|
|
library: ReferenceLibraryDto | null;
|
|
total: number;
|
|
importOpen: boolean;
|
|
onToggleImport: () => void;
|
|
onExport: (format: ExportFormat) => void;
|
|
}
|
|
|
|
// Breadcrumb, title, reference count, and the import toggle + export toolbar.
|
|
export function LibraryDetailHeader({
|
|
library,
|
|
total,
|
|
importOpen,
|
|
onToggleImport,
|
|
onExport,
|
|
}: LibraryDetailHeaderProps) {
|
|
return (
|
|
<>
|
|
<div className="flex items-center gap-2 text-sm text-ink/40">
|
|
<Link href="/console/references" className="hover:text-accent">
|
|
Reference libraries
|
|
</Link>
|
|
<span>/</span>
|
|
<span className="text-ink/60">{library?.name ?? "Library"}</span>
|
|
</div>
|
|
|
|
<div className="mt-2 flex items-start justify-between gap-4">
|
|
<div>
|
|
<h1 className="text-2xl font-semibold text-ink/80">
|
|
{library?.name ?? "Library"}
|
|
</h1>
|
|
<p className="mt-1 text-sm text-ink/40">
|
|
{library ? `${library.referenceCount ?? total} reference(s)` : " "}
|
|
</p>
|
|
</div>
|
|
<div className="flex items-center gap-2">
|
|
<button
|
|
onClick={onToggleImport}
|
|
className="text-sm bg-accent text-white rounded px-3 py-2 hover:opacity-90"
|
|
>
|
|
{importOpen ? "Close import" : "Import"}
|
|
</button>
|
|
<div className="flex items-center gap-1 text-sm">
|
|
<span className="text-ink/40">Export:</span>
|
|
<button
|
|
onClick={() => onExport("bibtex")}
|
|
className="text-accent hover:underline"
|
|
>
|
|
BibTeX
|
|
</button>
|
|
<span className="text-ink/20">|</span>
|
|
<button
|
|
onClick={() => onExport("ris")}
|
|
className="text-accent hover:underline"
|
|
>
|
|
RIS
|
|
</button>
|
|
<span className="text-ink/20">|</span>
|
|
<button
|
|
onClick={() => onExport("csv")}
|
|
className="text-accent hover:underline"
|
|
>
|
|
CSV
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|