From 6f424ebd2bbbfdf8cae7174e46fe91bc446d5ea7 Mon Sep 17 00:00:00 2001 From: AetherWing Date: Wed, 4 Feb 2026 20:11:11 +0800 Subject: [PATCH] fix(home-ui): align signal icon delay states with formatDelay (#6249) * fix(ui): align signal icon delay states with formatDelay * docs: changelog.md --- Changelog.md | 1 + src/components/home/current-proxy-card.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 06d46793f..bcf14b085 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,6 +8,7 @@ - 修复 Linux 通过 GUI 安装服务模式权限不符合预期 - 修复 macOS 因网口顺序导致无法正确设置代理 - 修复恢复休眠后无法操作托盘 +- 修复首页当前节点图标语义显示不一致
✨ 新增功能 diff --git a/src/components/home/current-proxy-card.tsx b/src/components/home/current-proxy-card.tsx index e410cc9f6..829a9492a 100644 --- a/src/components/home/current-proxy-card.tsx +++ b/src/components/home/current-proxy-card.tsx @@ -89,9 +89,13 @@ function getSignalIcon(delay: number): { text: string; color: string; } { - if (delay < 0) + if (delay === -2) + return { icon: , text: "测试中", color: "text.secondary" }; + if (delay === -1) return { icon: , text: "未测试", color: "text.secondary" }; - if (delay >= 10000) + if (delay > 1e5) + return { icon: , text: "错误", color: "error.main" }; + if (delay === 0 || delay >= 10000) return { icon: , text: "超时", color: "error.main" }; if (delay >= 500) return { icon: , text: "延迟较高", color: "error.main" };