From c2e36ab7331fbaf4018375ac7497306d36cc3d16 Mon Sep 17 00:00:00 2001 From: Murphy <72738186+toBerlinWay@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:45:05 +0000 Subject: [PATCH] fix(home): keep the delay chip inside the current node card for long node names (#8633) The node row is a space-between flex row, but the name column had the default min-width: auto and the name was not truncated. A long name with no break opportunity (for example xxx@host:443) widened the column to the full text, pushed the delay chip past the card edge and made the main content area scroll horizontally on narrow windows. Let the name column shrink, truncate the name with an ellipsis (the full name is in the title tooltip), and keep the chip from shrinking. Fixes #8589 Co-authored-by: toBerlinWay Co-authored-by: Claude Opus 5.5 --- Changelog.md | 1 + src/components/home/current-proxy-card.tsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 87e8220fb..00026ba6c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -29,6 +29,7 @@ - 修复全局模式默认停在 `DIRECT` 或 `REJECT` 导致流量未经代理,现自动切换到第一个策略组 - 修复订阅中未加引号的 REALITY `short-id`(如 `1234e123`)被误读为数字,导致订阅无法启用 - 修复订阅中唯一的代理组名为 `GLOBAL` 或没有代理组时,规则模式下代理页面显示「未获取到代理信息」 +- 修复窗口较窄时,首页「当前节点」卡片中过长的节点名把延迟标签挤出卡片 **🍎 macOS** diff --git a/src/components/home/current-proxy-card.tsx b/src/components/home/current-proxy-card.tsx index e537c8594..cf41a67d3 100644 --- a/src/components/home/current-proxy-card.tsx +++ b/src/components/home/current-proxy-card.tsx @@ -1008,8 +1008,13 @@ export const CurrentProxyCard = () => { border: `1px solid ${alpha(theme.palette.primary.main, 0.1)}`, }} > - - + + {currentProxy?.name ?? t('home.components.currentProxy.labels.noActiveNode')} @@ -1063,6 +1068,7 @@ export const CurrentProxyCard = () => { size="small" label={delayManager.formatDelay(currentDelay)} color={convertDelayColor(currentDelay)} + sx={{ flexShrink: 0, ml: 1 }} /> )}