feat: 新增站点版本与编译时间页脚展示,添加构建信息模块

创建站点构建信息模块,从package.json读取版本号,格式化编译时间为上海时区展示文案,添加异常容错并在页脚展示相关信息。
This commit is contained in:
2026-09-05 20:10:42 +08:00
parent fc6ed1631a
commit ac5a2cd66d
3 changed files with 46 additions and 1 deletions
+4
View File
@@ -1,5 +1,6 @@
import { Button } from "@/components/ui/button";
import Link from "next/link";
import { SITE_BUILD_LABEL, SITE_VERSION } from "@/lib/site-build";
function Footer() {
return (
@@ -7,6 +8,9 @@ function Footer() {
<div className="px-4 py-4 text-center text-sm text-muted-foreground">
&copy; {new Date().getFullYear()} Koring Team. All rights reserved. |
</div>
<div className="px-4 pb-4 text-center text-xs text-muted-foreground/70">
v{SITE_VERSION} · {SITE_BUILD_LABEL}UTC+8
</div>
<div className="px-4 py-4 text-center text-sm text-muted-foreground">
Koring Launcher Minecraft Mojang StudiosMicrosoft
</div>