git.iko.soy/parseable-macos
on master help sign in
Move "Add Connection" into instance picker dropdown, remove gear menu (#32)

Put "Add Connection..." in a separate section within the Picker dropdown instead of a separate gear menu. Remove "Edit Connection" and "Disconnect" options entirely. https://claude.ai/code/session_01G9EHpPdGwobh9VpLYrGcUu Co-authored-by: Claude <noreply@anthropic.com>

commitc7e5d4ef901e40d335bb01c78cc961a73e21b5c2 authoriko <mail@iko.soy> dateSun 15 Feb 2026, 19:58 (8 months ago) parent93748ca
1 file changed+12−23
ParseableViewer/Views/SidebarView.swift+12−23
ParseableViewer/Views/SidebarView.swift+12−23
@@ -199,6 +199,7 @@ struct SidebarView: View {
199199
200200struct ConnectionStatusView: View {
201201 @Environment(AppState.self) private var appState
202+ static let addConnectionID = UUID(uuidString: "00000000-0000-0000-0000-000000000000")!
202203
203204 var body: some View {
204205 VStack(alignment: .leading, spacing: 4) {
@@ -211,38 +212,26 @@ struct ConnectionStatusView: View {
211212 Picker("Connection", selection: Binding<UUID>(
212213 get: { connection.id },
213214 set: { newID in
214− if let conn = appState.connections.first(where: { $0.id == newID }) {
215+ if newID == ConnectionStatusView.addConnectionID {
216+ appState.editingConnection = nil
217+ appState.showConnectionSheet = true
218+ } else if let conn = appState.connections.first(where: { $0.id == newID }) {
215219 Task { await appState.connect(to: conn) }
216220 }
217221 }
218222 )) {
219− ForEach(appState.connections) { conn in
220− Text(conn.name).tag(conn.id)
223+ Section {
224+ ForEach(appState.connections) { conn in
225+ Text(conn.name).tag(conn.id)
226+ }
227+ }
228+ Section {
229+ Text("Add Connection...").tag(ConnectionStatusView.addConnectionID)
221230 }
222231 }
223232 .labelsHidden()
224233 .pickerStyle(.menu)
225234 .accessibilityLabel("Connection selector")
226− Spacer()
227− Menu {
228− Button("Add Connection...") {
229− appState.editingConnection = nil
230− appState.showConnectionSheet = true
231− }
232− Button("Edit Connection...") {
233− appState.editingConnection = connection
234− appState.showConnectionSheet = true
235− }
236− Divider()
237− Button("Disconnect") {
238− appState.disconnect()
239− }
240− } label: {
241− Image(systemName: "gear")
242− }
243− .menuStyle(.borderlessButton)
244− .frame(width: 24)
245− .accessibilityLabel("Connection options")
246235 }
247236 } else if appState.isConnecting {
248237 HStack {