- root deno.json workspace (nodeModulesDir auto), npm versions registered once in imports, deno.lock; remove pnpm-lock/pnpm-workspace/root package.json; members keep minimal package.json (name/type/exports) - tasks: dev, typecheck (tsc 7.0.2 per member + deno check), lint/fmt (biome, useImportExtensions), test (vitest via deno), check:tokens, build (web + deno compile), ci, db:migrate/reset, gen:types - tsconfig base moved to config/ (no root tsconfig.json); deno types -> types/deno.d.ts; web drops baseUrl - server: Deno.serve entry with graceful shutdown, --role migrate|preflight|probe, WEB_ROOT static SPA hosting; drop @hono/node-server, tsx, esbuild build.mjs - logger: redact child() bindings and serialize err by message/stack; sync stdout destination; tests - relative imports get explicit extensions (sites/mp-sync paths left for follow-up) - crash-recovery tests spawn `deno run -A`; tasks tests use unique per-file schemas - single-container Dockerfile + entrypoint (migrate -> preflight -> api+worker watchdog), docker-compose.yml - docs: README, runbook, ADR-001 superseded, plan §1 validation row Co-Authored-By: Claude Fable 5.1 <[email protected]>
26 lines
776 B
TypeScript
26 lines
776 B
TypeScript
import type { ReactNode } from "react";
|
|
import { cn } from "~/lib/utils.ts";
|
|
|
|
/** 控制台页面标题:标题 + 一句说明 + 右侧操作区 */
|
|
export function PageHeader({
|
|
title,
|
|
description,
|
|
actions,
|
|
className,
|
|
}: {
|
|
title: string;
|
|
description?: ReactNode;
|
|
actions?: ReactNode;
|
|
className?: string;
|
|
}) {
|
|
return (
|
|
<div className={cn("mb-6 flex flex-wrap items-end justify-between gap-4", className)}>
|
|
<div className="min-w-0">
|
|
<h1 className="text-title-lg font-semibold tracking-tight text-foreground">{title}</h1>
|
|
{description ? <p className="mt-1 text-body text-muted-foreground">{description}</p> : null}
|
|
</div>
|
|
{actions ? <div className="flex shrink-0 items-center gap-2">{actions}</div> : null}
|
|
</div>
|
|
);
|
|
}
|