diff --git a/frontend/src/pages/Dashboard.jsx b/frontend/src/pages/Dashboard.jsx index 1a042a9..cc633ae 100644 --- a/frontend/src/pages/Dashboard.jsx +++ b/frontend/src/pages/Dashboard.jsx @@ -103,7 +103,7 @@ const responsiveConfig = { const containerStyle = { minHeight: '100vh', background: 'linear-gradient(180deg, #f5f7fa 0%, #e8ecf1 100%)', - padding: '24px' + padding: '20px' }; const headerStyle = { @@ -202,7 +202,8 @@ const STAT_CARD_BASE_STYLE = { overflow: 'hidden', cursor: 'pointer', height: '100%', - animation: 'fadeInUp 0.6s ease-out backwards' + animation: 'fadeInUp 0.6s ease-out backwards', + borderLeft: '4px solid transparent' }; const STAT_ICON_CONTAINER_BASE = { @@ -219,15 +220,6 @@ const STAT_ICON_CONTAINER_BASE = { transition: `all ${designTokens.transitions.normal}` }; -const TOP_BORDER_BASE = { - position: 'absolute', - top: 0, - left: 0, - right: 0, - height: '4px', - borderRadius: `${designTokens.borderRadius.large} ${designTokens.borderRadius.large} 0 0` -}; - const NAV_BUTTON_BASE = { height: 'auto', padding: '24px 20px', @@ -256,7 +248,7 @@ const NAV_ICON_CONTAINER_BASE = { const createStatCardStyle = (color) => ({ ...STAT_CARD_BASE_STYLE, - borderTop: `4px solid ${color}` + borderLeftColor: color }); const createStatIconContainer = (color) => ({ @@ -264,11 +256,6 @@ const createStatIconContainer = (color) => ({ background: `linear-gradient(135deg, ${color}20 0%, ${color}10 100%)` }); -const createTopBorderStyle = (color) => ({ - ...TOP_BORDER_BASE, - background: `linear-gradient(90deg, ${color}, ${color}80)` -}); - const createNavButtonStyle = (color) => ({ ...NAV_BUTTON_BASE, borderColor: color @@ -664,7 +651,7 @@ function Dashboard() { const statCards = useMemo(() => [ { key: 'devices', - xs: 24, sm: 12, lg: 6, xl: 4, + xs: 24, sm: 12, md: 8, lg: 6, xl: 4, icon: CloudServerOutlined, color: designTokens.colors.primary.main, statKey: 'totalDevices', @@ -675,7 +662,7 @@ function Dashboard() { }, { key: 'racks', - xs: 24, sm: 12, lg: 6, xl: 4, + xs: 24, sm: 12, md: 8, lg: 6, xl: 4, icon: DatabaseOutlined, color: designTokens.colors.purple.main, statKey: 'totalRacks', @@ -687,7 +674,7 @@ function Dashboard() { }, { key: 'rooms', - xs: 24, sm: 12, lg: 6, xl: 4, + xs: 24, sm: 12, md: 8, lg: 6, xl: 4, icon: HomeOutlined, color: designTokens.colors.success.main, statKey: 'totalRooms', @@ -699,7 +686,7 @@ function Dashboard() { }, { key: 'faults', - xs: 24, sm: 12, lg: 6, xl: 4, + xs: 24, sm: 12, md: 8, lg: 6, xl: 4, icon: WarningOutlined, color: designTokens.colors.error.main, statKey: 'faultDevices', @@ -710,7 +697,7 @@ function Dashboard() { }, { key: 'users', - xs: 24, sm: 12, lg: 6, xl: 4, + xs: 24, sm: 12, md: 8, lg: 6, xl: 4, icon: TeamOutlined, color: designTokens.colors.cyan.main, statKey: 'totalUsers', @@ -721,7 +708,7 @@ function Dashboard() { }, { key: 'tickets', - xs: 24, sm: 12, lg: 6, xl: 4, + xs: 24, sm: 12, md: 8, lg: 6, xl: 4, icon: BarChartOutlined, color: '#fa8c16', statKey: 'activeTickets', @@ -749,7 +736,6 @@ function Dashboard() { onMouseLeave={() => setHoveredCard(null)} >
- 专业的机房设备管理解决方案,提供全方位的设备监控和管理能力 -
-+ 专业的机房设备管理解决方案,提供全方位的设备监控和管理能力 +