mirror of
https://github.com/kkebo/DNSecure.git
synced 2026-03-11 08:54:36 +00:00
Fix the issue that saving configuration doesn't work
This commit is contained in:
parent
96b85071a9
commit
3047ff690d
1 changed files with 10 additions and 10 deletions
|
|
@ -69,18 +69,8 @@ extension DetailView: View {
|
||||||
switch self.server.configuration {
|
switch self.server.configuration {
|
||||||
case .dnsOverTLS(let configuration):
|
case .dnsOverTLS(let configuration):
|
||||||
self.dnsOverTLSSections(configuration)
|
self.dnsOverTLSSections(configuration)
|
||||||
.onChange(of: self.focusedField) { newValue in
|
|
||||||
if newValue == nil {
|
|
||||||
self.server.configuration = .dnsOverTLS(configuration)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case .dnsOverHTTPS(let configuration):
|
case .dnsOverHTTPS(let configuration):
|
||||||
self.dnsOverHTTPSSections(configuration)
|
self.dnsOverHTTPSSections(configuration)
|
||||||
.onChange(of: self.focusedField) { newValue in
|
|
||||||
if newValue == nil {
|
|
||||||
self.server.configuration = .dnsOverHTTPS(configuration)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -156,6 +146,11 @@ extension DetailView: View {
|
||||||
} footer: {
|
} footer: {
|
||||||
Text("The TLS name of a DNS-over-TLS server.")
|
Text("The TLS name of a DNS-over-TLS server.")
|
||||||
}
|
}
|
||||||
|
.onChange(of: self.focusedField) { newValue in
|
||||||
|
if newValue == nil {
|
||||||
|
self.server.configuration = .dnsOverTLS(configuration)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
|
|
@ -231,6 +226,11 @@ extension DetailView: View {
|
||||||
} footer: {
|
} footer: {
|
||||||
Text("The URL of a DNS-over-HTTPS server.")
|
Text("The URL of a DNS-over-HTTPS server.")
|
||||||
}
|
}
|
||||||
|
.onChange(of: self.focusedField) { newValue in
|
||||||
|
if newValue == nil {
|
||||||
|
self.server.configuration = .dnsOverHTTPS(configuration)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue