/** 前端自己的构建信息(构建时由 Vite 写进来,见 web/build-info.mjs)。 */ declare const __APP_VERSION__: string declare const __APP_TAG__: string declare const __APP_COMMIT__: string declare const __APP_BUILT_AT__: string export const frontendBuild = { version: __APP_VERSION__, tag: __APP_TAG__, commit: __APP_COMMIT__, builtAt: __APP_BUILT_AT__, } /** 构建时间显示成本地时间「2026-10-06 20:30」;没有(开发服务器)就是空。 */ export function fmtBuiltAt(iso: string | null | undefined): string { if (!iso) return '' const d = new Date(iso) if (Number.isNaN(d.getTime())) return iso const p = (n: number) => String(n).padStart(2, '0') return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}` }