fix(ui): 统一下载页主题与智能路由页签间距

This commit is contained in:
zhanjunhao
2026-11-18 17:39:19 +08:00
parent 4c6e9acb6e
commit d076fb5325
12 changed files with 253 additions and 324 deletions
+4 -1
View File
@@ -261,8 +261,11 @@ export default function UiThemeProvider({ children }) {
// 日期面板的星期、月份名称来自 dayjs 全局语言,需与 Ant Design locale 保持一致。
dayjs.locale(DAYJS_LOCALES[language] || 'zh-cn');
useLayoutEffect(() => {
// The hosted download page shares the system shell and its popup tokens.
const isDownloadPage = /^\/weyai\/download\/?$/.test(pathname);
document.body.dataset.uiScope =
pathname.startsWith('/weyai/') || pathname.startsWith('/client/authorize')
(pathname.startsWith('/weyai/') && !isDownloadPage) ||
pathname.startsWith('/client/authorize')
? 'external'
: 'admin';
}, [pathname]);