Merge pull request #126 from kkebo/improve-textfield-ux-in-ruleview

This commit is contained in:
Kenta Kubo 2025-09-03 19:47:38 +09:00 committed by GitHub
commit 219df8ccc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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) }