- store records in SQLite via built-in node:sqlite, no native deps - wrap DB reads in await io() so they stay out of the static shell - add CRUD pages backed by Server Actions with per-request data - generate managed config and restart container via Docker socket - add /resolve page to query dnsmasq for A and CNAME records - add Dockerfile and compose setup with shared config volume
23 lines
726 B
TypeScript
23 lines
726 B
TypeScript
import Link from "next/link"
|
|
import { RecordForm } from "../_components/RecordForm"
|
|
import { createRecordAction } from "../actions"
|
|
|
|
export const metadata = { title: "新增记录" }
|
|
|
|
export default function NewRecordPage() {
|
|
return (
|
|
<section className="space-y-6">
|
|
<header className="space-y-1">
|
|
<Link
|
|
href="/records"
|
|
className="text-sm text-zinc-500 transition-opacity hover:opacity-70 dark:text-zinc-400">
|
|
← 返回列表
|
|
</Link>
|
|
<h1 className="text-xl font-semibold text-zinc-900 dark:text-zinc-100">新增记录</h1>
|
|
</header>
|
|
|
|
<RecordForm action={createRecordAction} submitLabel="创建记录" cancelHref="/records" />
|
|
</section>
|
|
)
|
|
}
|