From 769a44dd6c6bf3cbd9aaff4eded5da6d594becea Mon Sep 17 00:00:00 2001 From: axe006 Date: Mon, 10 Aug 2026 13:48:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(vault):=20=E9=99=90=E5=88=B6=E4=B8=BB?= =?UTF-8?q?=E6=9C=BA=E5=88=97=E8=A1=A8=E8=A1=8C=E6=9C=80=E5=A4=A7=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6=EF=BC=8C=E9=81=BF=E5=85=8D=E5=85=A8=E5=B1=8F=E6=97=B6?= =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E7=A9=BA=E7=99=BD=E8=AF=AF=E8=A7=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 树形视图和列表视图的行容器此前会撑满可用宽度,全屏下右侧大片 空白仍会响应整行点击,容易误触打开/选中主机。为分组行、主机行 (树形)及置顶/最近/分组/常规主机卡片(列表模式)统一加上 max-w-[480px],网格视图不受影响。 Co-Authored-By: Claude Sonnet 5 --- components/vault/VaultHostListSection.tsx | 10 +++++----- components/vault/VaultTreeRow.tsx | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/vault/VaultHostListSection.tsx b/components/vault/VaultHostListSection.tsx index d8ceda6abc..b4937ea103 100644 --- a/components/vault/VaultHostListSection.tsx +++ b/components/vault/VaultHostListSection.tsx @@ -516,7 +516,7 @@ export function VaultHostListSection({ ctx }: { ctx: VaultHostListSectionContext hostCardFocusClassName(viewMode, isHostFocusSelected(host.id)), ) : cn( - "h-14 px-2 py-2 rounded-lg transition-colors", + "h-14 max-w-[480px] px-2 py-2 rounded-lg transition-colors", isHostFocusSelected(host.id) ? hostCardFocusClassName("list", true) : "hover:bg-secondary/60", @@ -640,7 +640,7 @@ export function VaultHostListSection({ ctx }: { ctx: VaultHostListSectionContext hostCardFocusClassName(viewMode, isHostFocusSelected(host.id)), ) : cn( - "h-14 px-2 py-2 rounded-lg transition-colors", + "h-14 max-w-[480px] px-2 py-2 rounded-lg transition-colors", isHostFocusSelected(host.id) ? hostCardFocusClassName("list", true) : "hover:bg-secondary/60", @@ -777,7 +777,7 @@ export function VaultHostListSection({ ctx }: { ctx: VaultHostListSectionContext ), ) : cn( - "h-14 px-2 py-2 rounded-lg transition-colors", + "h-14 max-w-[480px] px-2 py-2 rounded-lg transition-colors", isGroupFocusSelected(node.path) || multiSelectedGroupPaths.has(node.path) ? hostCardFocusClassName("list", true) : "hover:bg-secondary/60", @@ -1005,7 +1005,7 @@ export function VaultHostListSection({ ctx }: { ctx: VaultHostListSectionContext hostCardFocusClassName(viewMode, isHostFocusSelected(host.id)), ) : cn( - "h-14 px-2 py-2 rounded-lg transition-colors", + "h-14 max-w-[480px] px-2 py-2 rounded-lg transition-colors", isHostFocusSelected(host.id) ? hostCardFocusClassName("list", true) : "hover:bg-secondary/60", @@ -1154,7 +1154,7 @@ export function VaultHostListSection({ ctx }: { ctx: VaultHostListSectionContext hostCardFocusClassName(viewMode, isHostFocusSelected(host.id)), ) : cn( - "h-14 px-2 py-2 rounded-lg transition-colors", + "h-14 max-w-[480px] px-2 py-2 rounded-lg transition-colors", isHostFocusSelected(host.id) ? hostCardFocusClassName("list", true) : "hover:bg-secondary/60", diff --git a/components/vault/VaultTreeRow.tsx b/components/vault/VaultTreeRow.tsx index b10e3394ca..5f0a6ee39a 100644 --- a/components/vault/VaultTreeRow.tsx +++ b/components/vault/VaultTreeRow.tsx @@ -129,7 +129,7 @@ export const VaultTreeGroupRow: React.FC = ({
= ({ }) => (