mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-08 00:26:37 +08:00
build: 优化 Docker/Workflow 构建,使用 Next.js 环境变量注入版本和构建时间,并移除对 package.json 的硬编码替换
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import {Info, Server} from "lucide-react"
|
||||
import packageJson from "../../../package.json"
|
||||
import {APP_VERSION, APP_BUILD_DATE} from "@/lib/app-info"
|
||||
import {apiConfig} from "@/lib/services"
|
||||
import {Card, CardContent, CardDescription, CardHeader, CardTitle} from "@/components/ui/card"
|
||||
|
||||
@@ -36,8 +37,8 @@ export function InfoTab({ systemConfigsLength, authSourcesLength }: InfoTabProps
|
||||
</CardHeader>
|
||||
<CardContent className="pt-4">
|
||||
<InfoRow label="应用名称" value={packageJson.name} />
|
||||
<InfoRow label="版本号" value={packageJson.version} />
|
||||
<InfoRow label="构建时间" value={packageJson.buildDate} />
|
||||
<InfoRow label="版本号" value={APP_VERSION} />
|
||||
{APP_BUILD_DATE && <InfoRow label="构建时间" value={APP_BUILD_DATE} />}
|
||||
<InfoRow label="Next.js" value={(packageJson as { dependencies?: Record<string, string> }).dependencies?.next} />
|
||||
<InfoRow label="React" value={(packageJson as { dependencies?: Record<string, string> }).dependencies?.react} />
|
||||
</CardContent>
|
||||
|
||||
Reference in New Issue
Block a user