feat: move footer sensitive info to environment variables

Remove hardcoded personal info and use env vars for footer settings.

Co-authored-by: Simon <85533298+handsomezhuzhu@users.noreply.github.com>
This commit is contained in:
v0
2026-02-04 15:32:43 +00:00
parent ff3dc45f2c
commit 035cbed4a0

View File

@@ -1095,17 +1095,24 @@ export default function TwoFactorAuth() {
{process.env.NEXT_PUBLIC_SHOW_FOOTER === "true" && ( {process.env.NEXT_PUBLIC_SHOW_FOOTER === "true" && (
<footer className="border-t py-6 mt-auto relative z-10 bg-background/80 backdrop-blur-sm"> <footer className="border-t py-6 mt-auto relative z-10 bg-background/80 backdrop-blur-sm">
<div className="mx-auto flex max-w-4xl flex-col items-center gap-2 text-center md:flex-row md:justify-between md:gap-4 px-4"> <div className="mx-auto flex max-w-4xl flex-col items-center gap-2 text-center md:flex-row md:justify-between md:gap-4 px-4">
<p className="text-xs tracking-wider text-muted-foreground">© 2025 Simon. All rights reserved.</p> <p className="text-xs tracking-wider text-muted-foreground">
© {new Date().getFullYear()} {process.env.NEXT_PUBLIC_FOOTER_COPYRIGHT || ""}. All rights reserved.
</p>
<div className="flex items-center gap-4 text-xs tracking-wider text-muted-foreground/60"> <div className="flex items-center gap-4 text-xs tracking-wider text-muted-foreground/60">
{process.env.NEXT_PUBLIC_ICP_NUMBER && (
<a <a
href="https://beian.miit.gov.cn/" href="https://beian.miit.gov.cn/"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
className="transition-colors hover:text-muted-foreground" className="transition-colors hover:text-muted-foreground"
> >
ICP备2025074424号 {process.env.NEXT_PUBLIC_ICP_NUMBER}
</a> </a>
)}
{process.env.NEXT_PUBLIC_ICP_NUMBER && process.env.NEXT_PUBLIC_PSB_NUMBER && (
<span className="text-muted-foreground/30">|</span> <span className="text-muted-foreground/30">|</span>
)}
{process.env.NEXT_PUBLIC_PSB_NUMBER && (
<a <a
href="https://beian.mps.gov.cn" href="https://beian.mps.gov.cn"
target="_blank" target="_blank"
@@ -1121,8 +1128,9 @@ export default function TwoFactorAuth() {
className="opacity-60" className="opacity-60"
src="/images/beian.png" src="/images/beian.png"
/> />
53250402000233 {process.env.NEXT_PUBLIC_PSB_NUMBER}
</a> </a>
)}
</div> </div>
</div> </div>
</footer> </footer>