feat: 隐藏掉 服务大盘的菜单入口及页面
This commit is contained in:
@@ -26,7 +26,6 @@ const pageTitles = {
|
||||
'/user-center/key-management': '密钥管理',
|
||||
'/user-center/dashboard': '数据看板',
|
||||
'/user-center/usage-record': '使用记录',
|
||||
'/user-center/service-dashboard': '服务监控',
|
||||
'/user-center/topup': '在线充值',
|
||||
'/user-center/settings': '个人设置',
|
||||
'/user-center/invite': '邀请有奖',
|
||||
|
||||
@@ -36,7 +36,6 @@ import {
|
||||
UserRound,
|
||||
Receipt,
|
||||
Gift,
|
||||
Activity,
|
||||
MonitorDown,
|
||||
} from 'lucide-react';
|
||||
import { StatusContext } from '../../context/Status';
|
||||
@@ -64,7 +63,6 @@ const UserCenterSidebar = () => {
|
||||
moduleGroups: {},
|
||||
dashboard: true,
|
||||
usageRecord: true,
|
||||
serviceDashboard: true,
|
||||
topup: true,
|
||||
invoice: true,
|
||||
invite: true,
|
||||
@@ -121,12 +119,6 @@ const UserCenterSidebar = () => {
|
||||
text: t('密钥管理'),
|
||||
icon: KeyRound,
|
||||
},
|
||||
{
|
||||
itemKey: '/user-center/service-dashboard',
|
||||
configKey: 'serviceDashboard',
|
||||
text: t('服务监控'),
|
||||
icon: Activity,
|
||||
},
|
||||
{
|
||||
itemKey: '/user-center/topup',
|
||||
configKey: 'topup',
|
||||
|
||||
@@ -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,子页面不再渲染自身背景,避免双层叠加 */}
|
||||
|
||||
Reference in New Issue
Block a user