From 4e3a76dba5e650090b14bba97239ba5180b75cc6 Mon Sep 17 00:00:00 2001 From: Qiu Yuzhou Date: Tue, 6 Oct 2026 14:11:12 +0800 Subject: [PATCH] fix(servers): remove location menu indentation --- .../App/UI/Servers/CreationLocationField.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ShadowsocksX-NG2/App/UI/Servers/CreationLocationField.swift b/ShadowsocksX-NG2/App/UI/Servers/CreationLocationField.swift index fce027b0..53d08064 100644 --- a/ShadowsocksX-NG2/App/UI/Servers/CreationLocationField.swift +++ b/ShadowsocksX-NG2/App/UI/Servers/CreationLocationField.swift @@ -16,15 +16,14 @@ struct CreationLocationField: View { } var body: some View { - let nodes = ancestors Picker("位置", selection: $parent) { - ForEach(Array(nodes.enumerated()), id: \.element.id) { depth, node in - Text(verbatim: String(repeating: " ", count: depth) + node.name) + ForEach(ancestors) { node in + Text(verbatim: node.name) .lineLimit(1) .truncationMode(.tail) .tag(Optional(node.id)) } - (Text(verbatim: String(repeating: " ", count: nodes.count)) + Text("所有服务器")) + Text("所有服务器") .tag(nil as NodeID?) } .pickerStyle(.menu)