import { prisma } from "@/lib/db"; import { Download, Calendar, Tag } from "lucide-react"; export const metadata = { title: "版本历史", description: "Nanami 启动器版本更新日志", }; export const revalidate = 120; export default async function ChangelogPage() { const software = await prisma.software.findUnique({ where: { slug: "nanami-launcher" }, include: { versions: { orderBy: { versionCode: "desc" }, }, }, }); const versions = software?.versions ?? []; return (

版本历史

Nanami 启动器更新日志

{versions.length === 0 ? (

暂无版本记录

) : (
{/* Timeline line */}
{versions.map((v, idx) => (
{/* Timeline dot */}
{/* Header */}

v{v.version}

{v.isLatest && ( 最新版本 )} {v.forceUpdate && ( 强制更新 )}
{/* Meta */}
{new Date(v.createdAt).toLocaleDateString("zh-CN")} Build {v.versionCode} {v.downloadCount.toLocaleString()} 次下载 {v.fileSize > 0 && ( {(v.fileSize / 1024 / 1024).toFixed(1)} MB )}
{/* Changelog */}
{v.changelog || "无更新说明"}
))}
)}
); }