mirror of
https://github.com/yggdrasil-network/yggdrasil-ios.git
synced 2025-04-28 14:15:09 +03:00
Tweaks
This commit is contained in:
parent
0bea3a1613
commit
1b9e84d056
9 changed files with 234 additions and 137 deletions
|
@ -18,7 +18,7 @@ struct PeersView: View {
|
|||
Section(content: {
|
||||
ForEach(Array(appDelegate.yggdrasilConfig.peers.enumerated()), id: \.offset) { index, peer in
|
||||
HStack() {
|
||||
TextField("Peer", text: $appDelegate.yggdrasilConfig.peers[index])
|
||||
TextField("tls://host:port", text: $appDelegate.yggdrasilConfig.peers[index])
|
||||
.labelsHidden()
|
||||
#if os(iOS)
|
||||
.disabled(!editMode!.wrappedValue.isEditing)
|
||||
|
@ -75,8 +75,18 @@ struct PeersView: View {
|
|||
.foregroundColor(.gray)
|
||||
}
|
||||
}
|
||||
TextField("Multicast password", text: $appDelegate.yggdrasilConfig.multicastPassword)
|
||||
.labelStyle(.titleAndIcon)
|
||||
VStack {
|
||||
HStack {
|
||||
Text("Multicast password")
|
||||
TextField("None", text: $appDelegate.yggdrasilConfig.multicastPassword)
|
||||
.labelsHidden()
|
||||
.multilineTextAlignment(.trailing)
|
||||
}
|
||||
Text("If provided, this device will only automatically peer with other nodes that share the same password.")
|
||||
.font(.system(size: 11))
|
||||
.foregroundColor(.gray)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
}, header: {
|
||||
Text("Local connectivity")
|
||||
})
|
||||
|
@ -85,8 +95,10 @@ struct PeersView: View {
|
|||
.navigationTitle("Peers")
|
||||
#if os(iOS)
|
||||
.toolbar {
|
||||
Button("Add", systemImage: "plus") {
|
||||
appDelegate.yggdrasilConfig.peers.append("")
|
||||
if editMode!.wrappedValue.isEditing {
|
||||
Button("Add", systemImage: "plus") {
|
||||
appDelegate.yggdrasilConfig.peers.append("")
|
||||
}
|
||||
}
|
||||
EditButton()
|
||||
.onChange(of: editMode!.wrappedValue) { edit in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue