fix(home-ui): align signal icon delay states with formatDelay (#6249)

* fix(ui): align signal icon delay states with formatDelay

* docs: changelog.md
This commit is contained in:
AetherWing 2026-02-04 20:11:11 +08:00 committed by GitHub
parent c7f5bc4e0d
commit 6f424ebd2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -8,6 +8,7 @@
- 修复 Linux 通过 GUI 安装服务模式权限不符合预期
- 修复 macOS 因网口顺序导致无法正确设置代理
- 修复恢复休眠后无法操作托盘
- 修复首页当前节点图标语义显示不一致
<details>
<summary><strong> ✨ 新增功能 </strong></summary>

View File

@ -89,9 +89,13 @@ function getSignalIcon(delay: number): {
text: string;
color: string;
} {
if (delay < 0)
if (delay === -2)
return { icon: <SignalNone />, text: "测试中", color: "text.secondary" };
if (delay === -1)
return { icon: <SignalNone />, text: "未测试", color: "text.secondary" };
if (delay >= 10000)
if (delay > 1e5)
return { icon: <SignalError />, text: "错误", color: "error.main" };
if (delay === 0 || delay >= 10000)
return { icon: <SignalError />, text: "超时", color: "error.main" };
if (delay >= 500)
return { icon: <SignalWeak />, text: "延迟较高", color: "error.main" };