fix: #3227 show traffic chart only when data is available

This commit is contained in:
wonfen 2025-04-01 13:51:35 +08:00
parent 7b5fd104de
commit 3039f39d40
3 changed files with 8 additions and 5 deletions

View File

@ -13,6 +13,7 @@
- MacOS 自定义托盘图标显示速率时图标和文本间隙过大
- MacOS 托盘速率显示不全
- Linux 在系统服务模式下无法拉起 Mihomo 内核
- 使用异步操作,避免获取系统信息和切换代理模式可能带来的崩溃
#### 新增了:
- Clash Verge Rev 从现在开始不再强依赖系统服务和管理权限
@ -28,6 +29,7 @@
- 前端统一刷新应用数据,优化数据获取和刷新逻辑
- 优化首页流量图表代码,调整图表文字边距
- MacOS 托盘速率更好的显示样式和更新逻辑
- 首页仅在有流量图表时显示流量图表区域
## v2.2.2

View File

@ -401,10 +401,12 @@ export const EnhancedTrafficStats = () => {
return (
<Grid container spacing={1} columns={{ xs: 8, sm: 8, md: 12 }}>
{trafficGraph && (
<Grid size={12}>
{/* 流量图表区域 */}
{trafficGraphComponent}
</Grid>
)}
{/* 统计卡片区域 */}
{statCards.map((card, index) => (
<Grid key={index} size={4}>

View File

@ -322,7 +322,6 @@ export const HomePage = () => {
title={t("Traffic Stats")}
icon={<SpeedOutlined />}
iconColor="secondary"
minHeight={280}
>
<EnhancedTrafficStats />
</EnhancedCard>