mirror of
https://github.com/yggdrasil-network/yggdrasil-ios.git
synced 2025-04-27 21:55:10 +03:00
Always show peer add button
This commit is contained in:
parent
b0c3d045a3
commit
f0c29a8a3e
1 changed files with 11 additions and 13 deletions
|
@ -98,19 +98,17 @@ struct PeersView: View {
|
|||
.navigationTitle("Peers")
|
||||
#if os(iOS)
|
||||
.toolbar {
|
||||
if editMode!.wrappedValue.isEditing {
|
||||
Button("Add", systemImage: "plus") {
|
||||
//appDelegate.yggdrasilConfig.peers.append("")
|
||||
addPeerURI = ""
|
||||
isAddingPeer.toggle()
|
||||
}.alert("Add new peer", isPresented: $isAddingPeer) {
|
||||
TextField("tls://host:port", text: $addPeerURI)
|
||||
.textInputAutocapitalization(.never)
|
||||
Button("Add", action: addPeer)
|
||||
Button("Cancel", role: .cancel) { }
|
||||
} message: {
|
||||
Text("Specify the peer URI to add.")
|
||||
}
|
||||
Button("Add", systemImage: "plus") {
|
||||
//appDelegate.yggdrasilConfig.peers.append("")
|
||||
addPeerURI = ""
|
||||
isAddingPeer.toggle()
|
||||
}.alert("Add new peer", isPresented: $isAddingPeer) {
|
||||
TextField("tls://host:port", text: $addPeerURI)
|
||||
.textInputAutocapitalization(.never)
|
||||
Button("Add", action: addPeer)
|
||||
Button("Cancel", role: .cancel) { }
|
||||
} message: {
|
||||
Text("Specify the peer URI to add.")
|
||||
}
|
||||
EditButton()
|
||||
.onChange(of: editMode!.wrappedValue) { edit in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue