From e5a7ecded8995668e7defc55dc261a940f2a9368 Mon Sep 17 00:00:00 2001 From: Joel-David Date: Sat, 15 Jun 2024 23:38:15 +0800 Subject: [PATCH] fix: disable autocorrect and auto capitalization for token details text fields --- Chronos/App/Tabs/Tokens/AddToken/AddManualTokenView.swift | 5 +++++ Chronos/App/Tabs/Tokens/Row/UpdateTokenView.swift | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Chronos/App/Tabs/Tokens/AddToken/AddManualTokenView.swift b/Chronos/App/Tabs/Tokens/AddToken/AddManualTokenView.swift index 73737df..4cdf3d8 100644 --- a/Chronos/App/Tabs/Tokens/AddToken/AddManualTokenView.swift +++ b/Chronos/App/Tabs/Tokens/AddToken/AddManualTokenView.swift @@ -38,16 +38,21 @@ struct AddManualTokenView: View { Section(header: Text("Information")) { LabeledContent { TextField("Issuer", text: $issuer) + .disableAutocorrection(true) } label: { Text("Issuer") } LabeledContent("Account") { TextField("Account", text: $account) + .disableAutocorrection(true) + .autocapitalization(/*@START_MENU_TOKEN@*/.none/*@END_MENU_TOKEN@*/) } LabeledContent("Secret") { Group { if showSecret { TextField("Secret", text: $secret) + .disableAutocorrection(true) + .autocapitalization(/*@START_MENU_TOKEN@*/.none/*@END_MENU_TOKEN@*/) } else { SecureField("Secret", text: $secret) } diff --git a/Chronos/App/Tabs/Tokens/Row/UpdateTokenView.swift b/Chronos/App/Tabs/Tokens/Row/UpdateTokenView.swift index 7d7c86e..56a4470 100644 --- a/Chronos/App/Tabs/Tokens/Row/UpdateTokenView.swift +++ b/Chronos/App/Tabs/Tokens/Row/UpdateTokenView.swift @@ -41,16 +41,21 @@ struct UpdateTokenView: View { Section(header: Text("Information")) { LabeledContent { TextField("Issuer", text: $issuer) + .disableAutocorrection(true) } label: { Text("Issuer") } LabeledContent("Account") { TextField("Account", text: $account) + .disableAutocorrection(true) + .autocapitalization(/*@START_MENU_TOKEN@*/.none/*@END_MENU_TOKEN@*/) } LabeledContent("Secret") { Group { if showSecret { TextField("Secret", text: $secret) + .disableAutocorrection(true) + .autocapitalization(/*@START_MENU_TOKEN@*/.none/*@END_MENU_TOKEN@*/) } else { SecureField("Secret", text: $secret) .disabled(true)