feat: 交付官方 Docker 运行时,外观改背景图并下线自定义 CSS/JS
站点/后台分轨背景与用户列表排序一并落地;生产 CORS 改走 SITE_URL,健康检查带版本号。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import pkg from "../package.json";
|
||||
import FooterTiming from "./FooterTiming";
|
||||
|
||||
// 仅把明确发布过的版本视为"真实版本";脚手架默认号视为未设计,传空显示占位
|
||||
function realVersion(v: string): string {
|
||||
return !v || v === "0.0.0" || v === "0.1.0" ? "" : v;
|
||||
// 官方镜像构建会写入 NEXT_PUBLIC_APP_VERSION(可与脚手架 0.1.0 相同)。
|
||||
// 未注入时,脚手架默认号仍当未发布,页脚显示占位。
|
||||
function realVersion(pkgVersion: string): string {
|
||||
const injected = process.env.NEXT_PUBLIC_APP_VERSION?.trim();
|
||||
if (injected) return injected;
|
||||
return !pkgVersion || pkgVersion === "0.0.0" || pkgVersion === "0.1.0" ? "" : pkgVersion;
|
||||
}
|
||||
|
||||
// 极简页脚:版权 + 实时性能指标(版本 / 页面加载 / 模板生成)
|
||||
@@ -12,7 +15,13 @@ export default function Footer({ siteName = "姜十三社区" }: { siteName?: st
|
||||
const brand = siteName.trim() || "姜十三社区";
|
||||
|
||||
return (
|
||||
<footer className="mt-14" style={{ borderTop: "1px solid var(--line)" }}>
|
||||
<footer
|
||||
className="mt-14"
|
||||
style={{
|
||||
borderTop: "1px solid var(--line)",
|
||||
background: "var(--panel)",
|
||||
}}
|
||||
>
|
||||
<div className="max-w-[1440px] mx-auto px-4 sm:px-6 py-4 flex items-center justify-between gap-4">
|
||||
<span className="meta text-[12px] whitespace-nowrap">© {year} {brand}</span>
|
||||
<FooterTiming version={realVersion(pkg.version)} />
|
||||
|
||||
Reference in New Issue
Block a user