diff --git a/UPDATELOG.md b/UPDATELOG.md index af4c956d..71524f99 100644 --- a/UPDATELOG.md +++ b/UPDATELOG.md @@ -13,6 +13,7 @@ - MacOS 自定义托盘图标显示速率时图标和文本间隙过大 - MacOS 托盘速率显示不全 - Linux 在系统服务模式下无法拉起 Mihomo 内核 + - 使用异步操作,避免获取系统信息和切换代理模式可能带来的崩溃 #### 新增了: - Clash Verge Rev 从现在开始不再强依赖系统服务和管理权限 @@ -28,6 +29,7 @@ - 前端统一刷新应用数据,优化数据获取和刷新逻辑 - 优化首页流量图表代码,调整图表文字边距 - MacOS 托盘速率更好的显示样式和更新逻辑 + - 首页仅在有流量图表时显示流量图表区域 ## v2.2.2 diff --git a/src/components/home/enhanced-traffic-stats.tsx b/src/components/home/enhanced-traffic-stats.tsx index fdc4f3b6..946233fb 100644 --- a/src/components/home/enhanced-traffic-stats.tsx +++ b/src/components/home/enhanced-traffic-stats.tsx @@ -401,10 +401,12 @@ export const EnhancedTrafficStats = () => { return ( - - {/* 流量图表区域 */} - {trafficGraphComponent} - + {trafficGraph && ( + + {/* 流量图表区域 */} + {trafficGraphComponent} + + )} {/* 统计卡片区域 */} {statCards.map((card, index) => ( diff --git a/src/pages/home.tsx b/src/pages/home.tsx index cc37dc12..e0e569bd 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -322,7 +322,6 @@ export const HomePage = () => { title={t("Traffic Stats")} icon={} iconColor="secondary" - minHeight={280} >