官网 初版
This commit is contained in:
24
src/app/admin/(dashboard)/releases/new/page.tsx
Normal file
24
src/app/admin/(dashboard)/releases/new/page.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { prisma } from "@/lib/db";
|
||||
import { ReleaseForm } from "@/components/admin/ReleaseForm";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function NewReleasePage() {
|
||||
const addons = await prisma.addon.findMany({
|
||||
select: { id: true, name: true },
|
||||
orderBy: { name: "asc" },
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="mx-auto max-w-2xl space-y-6">
|
||||
<h1 className="text-3xl font-bold">发布新版本</h1>
|
||||
{addons.length === 0 ? (
|
||||
<p className="text-muted-foreground">
|
||||
请先创建一个插件后再发布版本。
|
||||
</p>
|
||||
) : (
|
||||
<ReleaseForm addons={addons} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user