Improve connection selection UI

This commit is contained in:
Christoph Hagen 2023-12-20 19:00:38 +01:00
parent 33d84b40db
commit f8fc37d7e0

View File

@ -57,9 +57,12 @@ struct ContentView: View {
}
Picker("Connection type", selection: $coordinator.connectionType) {
ForEach(ConnectionStrategy.allCases, id: \.rawValue) { connection in
Text(connection.description).tag(connection)
}
Text(ConnectionStrategy.local.description).tag(ConnectionStrategy.local)
Text(ConnectionStrategy.remote.description).tag(ConnectionStrategy.remote)
Text(ConnectionStrategy.remoteFirst.description).tag(ConnectionStrategy.remoteFirst)
// ForEach(ConnectionStrategy.allCases, id: \.rawValue) { connection in
// Text(connection.description).tag(connection)
// }
}
.pickerStyle(.segmented)
.padding(.horizontal, 30)