From 1390449e0628933d4c7a2b6c20145ae5eeaea9b5 Mon Sep 17 00:00:00 2001 From: Qiu Yuzhou Date: Sun, 11 Oct 2026 18:28:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(plugins):=20=E5=AE=89=E5=85=A8=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E8=AF=A6=E6=83=85=E6=95=B4=E8=A1=8C=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../App/UI/Servers/Plugin/PluginManagementSection.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ShadowsocksX-NG2/App/UI/Servers/Plugin/PluginManagementSection.swift b/ShadowsocksX-NG2/App/UI/Servers/Plugin/PluginManagementSection.swift index f917a04a..01f4cae9 100644 --- a/ShadowsocksX-NG2/App/UI/Servers/Plugin/PluginManagementSection.swift +++ b/ShadowsocksX-NG2/App/UI/Servers/Plugin/PluginManagementSection.swift @@ -114,6 +114,7 @@ struct PluginManagementSection: View { private struct PluginSecurityDetails: View { let facts: PluginSecurityFacts? + @State private var isExpanded = false var body: some View { if let facts { @@ -121,7 +122,7 @@ private struct PluginSecurityDetails: View { Label(warning, systemImage: "exclamationmark.triangle") .font(.caption).foregroundStyle(.orange) } - DisclosureGroup("安全检查详情") { + DisclosureGroup(isExpanded: $isExpanded) { VStack(alignment: .leading, spacing: 3) { Text(PluginManagementCopy.quarantine(facts.quarantine)) Text(PluginManagementCopy.signature(facts.signature)) @@ -130,6 +131,12 @@ private struct PluginSecurityDetails: View { .foregroundStyle(.secondary) } .frame(maxWidth: .infinity, alignment: .leading) + } label: { + // macOS 上 DisclosureGroup 默认仅三角图标可点,整行铺开让文字也响应点击。 + Text("安全检查详情") + .frame(maxWidth: .infinity, alignment: .leading) + .contentShape(Rectangle()) + .onTapGesture { withAnimation { isExpanded.toggle() } } } .font(.caption) } else {