diff --git a/Changelog.md b/Changelog.md index 567a8b7c9..654c7ada6 100644 --- a/Changelog.md +++ b/Changelog.md @@ -52,5 +52,6 @@ - 系统代理失败给出可操作的具体原因,而非操作系统的英文原文 - 配置变更后统一广播刷新,界面开关与托盘状态保持同步 - 重构命令层错误返回为结构化格式,保留完整诊断链 +- 优化首页界面中当前节点固定状态显示 diff --git a/src/components/home/current-proxy-card.tsx b/src/components/home/current-proxy-card.tsx index cc8fb10a4..7bf922174 100644 --- a/src/components/home/current-proxy-card.tsx +++ b/src/components/home/current-proxy-card.tsx @@ -219,6 +219,7 @@ const sortProxyOptions = ( interface PersistentProxySelectProps { label: string groupName: string + fixed?: string value: string selectedName: string selectedDelay: number @@ -234,6 +235,7 @@ interface PersistentProxySelectProps { const PersistentProxySelect = ({ label, groupName, + fixed, value, selectedName, selectedDelay, @@ -248,6 +250,7 @@ const PersistentProxySelect = ({ const anchorRef = useRef(null) const listboxId = 'current-proxy-node-listbox' const labelId = 'proxy-select-label' + const fixedProxyInUsed = selectedName === fixed useEffect(() => { if (!open) return @@ -301,6 +304,18 @@ const PersistentProxySelect = ({ label={delayManager.formatDelay(selectedDelay)} color={convertDelayColor(selectedDelay)} /> + {fixedProxyInUsed && ( + + 📌 + + )} )} SelectDisplayProps={{ @@ -334,6 +349,7 @@ const PersistentProxySelect = ({ > {options.map((option) => { const selected = option.value === value + const isFixed = option.name === fixed const delay = option.disabled ? -1 : delayManager.getDelayFix(option.member, groupName) @@ -356,6 +372,21 @@ const PersistentProxySelect = ({ pr: 1, }} > + {isFixed && ( + + 📌 + + )} {option.name} @@ -974,6 +1005,7 @@ export const CurrentProxyCard = () => {