feat: 隐藏服务监控-菜单入口
This commit is contained in:
@@ -18,6 +18,14 @@
|
||||
- **回滚**:`controls.jsx` 与上述三处调用方需一起还原;文档按文件还原。
|
||||
- **关联**:`docs/standards/DEV_STANDARDS.md` 2.3
|
||||
|
||||
### 调整 · 隐藏用户中心服务监控
|
||||
|
||||
- **范围**:用户中心桌面侧栏、移动端底栏、服务监控路由与面包屑。
|
||||
- **变更**:移除服务监控菜单,原页面地址与旧 `/service-dashboard` 地址均跳转到用户中心首个已开放页面;默认页候选排除服务监控,无可用页面时回到首页。
|
||||
- **影响**:服务监控不再挂载,不触发该页面的监控请求;保留页面源码与后台配置,其他菜单沿用原有配置。
|
||||
- **回滚**:仅还原本条涉及的用户中心入口、侧栏、面包屑及服务监控规范差异。
|
||||
- **关联**:`docs/ui/SERVICE_DASHBOARD_SPEC.md`。
|
||||
|
||||
## 2026-11-17
|
||||
|
||||
### 调整 · 官网设置指标只填数字并实时预览官网展示
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 服务监控 UI 规范(/user-center/service-dashboard)
|
||||
|
||||
> 状态:有效 · 适用:antd 6.7.0 · 更新:2026-11-11 · 版本:v2.1
|
||||
> 状态:有效(页面暂不开放) · 适用:antd 6.7.0 · 更新:2026-11-18 · 版本:v2.2
|
||||
|
||||
服务监控页的规范:分组可用性、历史条与详情弹窗。
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
| 关注点 | 规则 |
|
||||
| --- | --- |
|
||||
| 路由 | `/user-center/service-dashboard`,旧 `/service-dashboard` 重定向 |
|
||||
| 路由 | 桌面侧栏与移动底栏隐藏服务监控;`/user-center/service-dashboard` 及旧 `/service-dashboard` 均回到用户中心首个已开放页面,无可用页面时回到首页;保留页面源码,以下视觉与验收规则供恢复时使用 |
|
||||
| 组件 | `Card`、`Button`、详情 `Modal` + `Statistic` + `Table`、`Tooltip`、`Spin` / `Empty` |
|
||||
| 主题 | `theme.useToken()` 注入 `--service-*`;正常态跟随 `colorPrimary`,告警 / 异常用 `colorWarning` / `colorError` |
|
||||
| 业务 | 60 秒自动刷新、逐秒倒计时、分组权限、模型测试与请求不变 |
|
||||
|
||||
@@ -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