mirror of
https://github.com/jeremysrand/ListenerApp.git
synced 2024-12-21 13:29:53 +00:00
More updates to improve behaviour of the destinations list.
This commit is contained in:
parent
c9936e82f5
commit
2c58886439
@ -13,10 +13,7 @@ struct Destination: Identifiable, Hashable {
|
||||
}
|
||||
|
||||
struct DestinationsView: View {
|
||||
@State private var destinations = [
|
||||
Destination(ipAddress: "192.168.1.20"),
|
||||
Destination(ipAddress: "192.168.1.21")
|
||||
]
|
||||
@State private var destinations:[Destination] = []
|
||||
@State private var editMode = EditMode.inactive
|
||||
@State private var showPopover = false
|
||||
@State private var newDestination = ""
|
||||
@ -51,13 +48,25 @@ struct DestinationsView: View {
|
||||
|
||||
private var addPopover: some View {
|
||||
VStack {
|
||||
Text("Enter the hostname or\nIP address of your GS:")
|
||||
Text("Enter the hostname or IP address of your GS:")
|
||||
.font(.title2)
|
||||
TextField("New destination", text: self.$newDestination) { isEditing in
|
||||
} onCommit: {
|
||||
onAdd()
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.padding()
|
||||
HStack {
|
||||
Button("Cancel") {
|
||||
self.showPopover = false
|
||||
editMode = EditMode.inactive
|
||||
}
|
||||
.padding()
|
||||
Button("Add") {
|
||||
onAdd()
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}.padding()
|
||||
}
|
||||
|
||||
private func onDelete(offsets: IndexSet) {
|
||||
|
@ -19,7 +19,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>210</string>
|
||||
<string>239</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
Loading…
Reference in New Issue
Block a user