Skip to content

Commit 219df8c

Browse files
authored
Merge pull request #126 from kkebo/improve-textfield-ux-in-ruleview
2 parents 547b548 + e7710e9 commit 219df8c

4 files changed

Lines changed: 14 additions & 0 deletions

File tree

DNSecure/Views/DNSSearchDomainMatchView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ extension DNSSearchDomainMatchView: View {
1818
set: { self.rule.dnsSearchDomainMatch[i] = $0 }
1919
)
2020
)
21+
.textContentType(.URL)
22+
.keyboardType(.URL)
23+
.textInputAutocapitalization(.never)
24+
.autocorrectionDisabled()
2125
}
2226
.onDelete { self.rule.dnsSearchDomainMatch.remove(atOffsets: $0) }
2327
.onMove { self.rule.dnsSearchDomainMatch.move(fromOffsets: $0, toOffset: $1) }

DNSecure/Views/DNSServerAddressMatchView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ extension DNSServerAddressMatchView: View {
1818
set: { self.rule.dnsServerAddressMatch[i] = $0 }
1919
)
2020
)
21+
.textContentType(.URL)
22+
.keyboardType(.numbersAndPunctuation)
23+
.textInputAutocapitalization(.never)
24+
.autocorrectionDisabled()
2125
}
2226
.onDelete { self.rule.dnsServerAddressMatch.remove(atOffsets: $0) }
2327
.onMove { self.rule.dnsServerAddressMatch.move(fromOffsets: $0, toOffset: $1) }

DNSecure/Views/ProbeURLView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ extension ProbeURLView: View {
1717
Form {
1818
Section {
1919
LazyTextField("Probe URL", text: self.probeURL)
20+
.textContentType(.URL)
21+
.keyboardType(.URL)
22+
.textInputAutocapitalization(.never)
23+
.autocorrectionDisabled()
2024
} footer: {
2125
Text(
2226
"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."

DNSecure/Views/SSIDMatchView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ extension SSIDMatchView: View {
1818
set: { self.rule.ssidMatch[i] = $0 }
1919
)
2020
)
21+
.textInputAutocapitalization(.never)
22+
.autocorrectionDisabled()
2123
}
2224
.onDelete { self.rule.ssidMatch.remove(atOffsets: $0) }
2325
.onMove { self.rule.ssidMatch.move(fromOffsets: $0, toOffset: $1) }

0 commit comments

Comments
 (0)