From dfad891ed9013cb53003a897e3bceca6fcc0582a Mon Sep 17 00:00:00 2001 From: Yunlong Wen <350394277@qq.com> Date: Mon, 15 Jun 2026 18:55:44 +0800 Subject: [PATCH] feat(footer): center footer content and render Markdown links Center the custom footer block (drop desktop left-align) and render its content with the shared Markdown component (react-markdown + remark-gfm + rehype-raw), so admins can write links like [ICP](https://beian.miit.gov.cn). External links open in a new tab. Update the Footer field description (en/zh) to hint Markdown support. Default multi-column footer unchanged. --- .../src/components/layout/components/footer.tsx | 12 ++++++------ web/default/src/i18n/locales/en.json | 2 +- web/default/src/i18n/locales/zh.json | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web/default/src/components/layout/components/footer.tsx b/web/default/src/components/layout/components/footer.tsx index 00a6efbcceb7..00ab71f1b7d0 100644 --- a/web/default/src/components/layout/components/footer.tsx +++ b/web/default/src/components/layout/components/footer.tsx @@ -20,6 +20,7 @@ import { Fragment, useMemo } from 'react' import { Link } from '@tanstack/react-router' import { useTranslation } from 'react-i18next' import { cn } from '@/lib/utils' +import { Markdown } from '@/components/ui/markdown' import { useStatus } from '@/hooks/use-status' import { useSystemConfig } from '@/hooks/use-system-config' @@ -196,12 +197,11 @@ export function Footer(props: FooterProps) { )} >
-
-
-
+
+
+ {footerHtml} +
+
diff --git a/web/default/src/i18n/locales/en.json b/web/default/src/i18n/locales/en.json index 97e47f5552c9..dce0fea4307e 100644 --- a/web/default/src/i18n/locales/en.json +++ b/web/default/src/i18n/locales/en.json @@ -1800,7 +1800,7 @@ "Follow the guided steps to prepare your workspace before the first login.": "Follow the guided steps to prepare your workspace before the first login.", "Font": "Font", "Footer": "Footer", - "Footer text displayed at the bottom of pages": "Footer text displayed at the bottom of pages", + "Footer text displayed at the bottom of pages": "Footer content shown at the bottom of pages. Supports Markdown links, e.g. [ICP No.](https://beian.miit.gov.cn)", "footer.columns.about.links.aboutProject": "About Project", "footer.columns.about.links.contact": "Contact Us", "footer.columns.about.links.features": "Features", diff --git a/web/default/src/i18n/locales/zh.json b/web/default/src/i18n/locales/zh.json index 2c68e20310c2..e74c6789a643 100644 --- a/web/default/src/i18n/locales/zh.json +++ b/web/default/src/i18n/locales/zh.json @@ -1851,7 +1851,7 @@ "Follow the guided steps to prepare your workspace before the first login.": "请按照引导步骤在首次登录前准备您的工作区。", "Font": "字体", "Footer": "页脚", - "Footer text displayed at the bottom of pages": "显示在页面底部的页脚文本", + "Footer text displayed at the bottom of pages": "显示在页面底部的页脚内容,支持 Markdown 链接,例如 [京ICP备12345号](https://beian.miit.gov.cn)", "footer.columns.about.links.aboutProject": "关于项目", "footer.columns.about.links.contact": "联系我们", "footer.columns.about.links.features": "功能",