Disable autocorrection on profile name
This commit is contained in:
parent
deac70359f
commit
84790080be
|
@ -401,6 +401,11 @@ extension View {
|
||||||
// MARK: Validation
|
// MARK: Validation
|
||||||
|
|
||||||
extension View {
|
extension View {
|
||||||
|
func themeProfileName() -> some View {
|
||||||
|
autocapitalization(.none)
|
||||||
|
.disableAutocorrection(true)
|
||||||
|
}
|
||||||
|
|
||||||
func themeURL(_ urlString: String?) -> some View {
|
func themeURL(_ urlString: String?) -> some View {
|
||||||
themeValidating(urlString, validator: Validators.url)
|
themeValidating(urlString, validator: Validators.url)
|
||||||
.keyboardType(.asciiCapable)
|
.keyboardType(.asciiCapable)
|
||||||
|
|
|
@ -44,6 +44,7 @@ enum AddProfileView {
|
||||||
footer: themeErrorMessage(errorMessage)
|
footer: themeErrorMessage(errorMessage)
|
||||||
) {
|
) {
|
||||||
TextField(L10n.Global.Placeholders.profileName, text: $profileName, onCommit: onCommit)
|
TextField(L10n.Global.Placeholders.profileName, text: $profileName, onCommit: onCommit)
|
||||||
|
.themeProfileName()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ extension ProfileView {
|
||||||
header: Text(L10n.Profile.Alerts.Rename.title)
|
header: Text(L10n.Profile.Alerts.Rename.title)
|
||||||
) {
|
) {
|
||||||
TextField(L10n.Global.Placeholders.profileName, text: $newName, onCommit: commitRenaming)
|
TextField(L10n.Global.Placeholders.profileName, text: $newName, onCommit: commitRenaming)
|
||||||
.disableAutocorrection(true)
|
.themeProfileName()
|
||||||
.onAppear(perform: loadCurrentName)
|
.onAppear(perform: loadCurrentName)
|
||||||
}
|
}
|
||||||
}.themeSecondaryView()
|
}.themeSecondaryView()
|
||||||
|
|
Loading…
Reference in New Issue