fix: improve text field UX in RuleView

This commit is contained in:
Kenta Kubo 2025-09-03 04:05:34 +09:00
parent 547b548525
commit e7710e9928
No known key found for this signature in database
GPG key ID: 3D79E20285C94BE8
4 changed files with 14 additions and 0 deletions

View file

@ -18,6 +18,10 @@ extension DNSSearchDomainMatchView: View {
set: { self.rule.dnsSearchDomainMatch[i] = $0 }
)
)
.textContentType(.URL)
.keyboardType(.URL)
.textInputAutocapitalization(.never)
.autocorrectionDisabled()
}
.onDelete { self.rule.dnsSearchDomainMatch.remove(atOffsets: $0) }
.onMove { self.rule.dnsSearchDomainMatch.move(fromOffsets: $0, toOffset: $1) }

View file

@ -18,6 +18,10 @@ extension DNSServerAddressMatchView: View {
set: { self.rule.dnsServerAddressMatch[i] = $0 }
)
)
.textContentType(.URL)
.keyboardType(.numbersAndPunctuation)
.textInputAutocapitalization(.never)
.autocorrectionDisabled()
}
.onDelete { self.rule.dnsServerAddressMatch.remove(atOffsets: $0) }
.onMove { self.rule.dnsServerAddressMatch.move(fromOffsets: $0, toOffset: $1) }

View file

@ -17,6 +17,10 @@ extension ProbeURLView: View {
Form {
Section {
LazyTextField("Probe URL", text: self.probeURL)
.textContentType(.URL)
.keyboardType(.URL)
.textInputAutocapitalization(.never)
.autocorrectionDisabled()
} footer: {
Text(
"If a request sent to this URL results in a HTTP 200 OK response and all of the other conditions in the rule match, then the rule matches. If you don't want to use this rule, leave it empty."

View file

@ -18,6 +18,8 @@ extension SSIDMatchView: View {
set: { self.rule.ssidMatch[i] = $0 }
)
)
.textInputAutocapitalization(.never)
.autocorrectionDisabled()
}
.onDelete { self.rule.ssidMatch.remove(atOffsets: $0) }
.onMove { self.rule.ssidMatch.move(fromOffsets: $0, toOffset: $1) }