feat: 隐藏掉 服务大盘的菜单入口及页面

This commit is contained in:
zhanjunhao
2026-11-18 10:28:41 +08:00
parent 737c353d84
commit b477623397
5 changed files with 15 additions and 29 deletions
+2 -17
View File
@@ -32,7 +32,6 @@ import {
ScrollText,
Wallet,
UserRound,
Activity,
Gift,
Receipt,
} from 'lucide-react';
@@ -47,7 +46,6 @@ import Invite from './Invite';
import Invoice from './Invoice';
import TopUp from '../TopUp';
import PersonalSetting from '../../components/settings/PersonalSetting';
import ServiceDashboard from '../ServiceDashboard';
import WeyAiDownload from '../WeyAiDownload';
import KeyManagement from '../KeyManagement';
import { normalizeSidebarModulesAdmin } from '../../constants/sidebarModules';
@@ -81,12 +79,6 @@ const MobileBottomNav = ({ sidebarConfig }) => {
label: t('密钥管理'),
path: '/user-center/key-management',
},
{
key: 'serviceDashboard',
icon: Activity,
label: t('监控'),
path: '/user-center/service-dashboard',
},
{
key: 'invite',
icon: Gift,
@@ -169,7 +161,6 @@ const UserCenter = ({ keyManagementMode = false }) => {
const userCenterRoutes = [
'dashboard',
'usageRecord',
'serviceDashboard',
'topup',
'invoice',
'invite',
@@ -178,7 +169,6 @@ const UserCenter = ({ keyManagementMode = false }) => {
const routePathMap = {
dashboard: 'dashboard',
usageRecord: 'usage-record',
serviceDashboard: 'service-dashboard',
topup: 'topup',
invoice: 'invoice',
invite: 'invite',
@@ -246,15 +236,10 @@ const UserCenter = ({ keyManagementMode = false }) => {
path='usage-record'
element={guardUserCenterRoute('usageRecord', <UsageRecord />)}
/>
{/* ServiceDashboard 组件内部有 min-h-screen pt-[88px],嵌入 UserCenter 后用 -mt-[64px] 部分抵消 pt,保留 24px 顶部间距(与其他页面 p-6 一致),[&>div]:min-h-0 避免撑高 */}
{/* 服务监控暂不开放,历史地址回到首个已开放页面。 */}
<Route
path='service-dashboard'
element={guardUserCenterRoute(
'serviceDashboard',
<div className='-mt-[64px] [&>div]:min-h-0'>
<ServiceDashboard />
</div>,
)}
element={<Navigate to={firstVisibleRoute} replace />}
/>
{/* TopUp 组件内部有 pt-[64px] 用于独立路由清除固定头部,UserCenter 已处理顶部偏移,需用 -mt 抵消。
* embedded:UserCenter shell 已提供 PageBackground,子页面不再渲染自身背景,避免双层叠加 */}