mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
Improve signing experience when using non-english keyboard
This commit is contained in:
parent
91f75843da
commit
5054ead2ca
1 changed files with 7 additions and 0 deletions
|
|
@ -1,9 +1,14 @@
|
|||
import SwiftUI
|
||||
|
||||
struct SignInCredentialsView: View {
|
||||
private enum FocusedField {
|
||||
case username, password
|
||||
}
|
||||
|
||||
@EnvironmentObject var appState: AppState
|
||||
@State private var username: String = ""
|
||||
@State private var password: String = ""
|
||||
@FocusState private var focusedField: FocusedField?
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
|
|
@ -16,11 +21,13 @@ struct SignInCredentialsView: View {
|
|||
TextField(text: $username) {
|
||||
Text(verbatim: "example@icloud.com")
|
||||
}
|
||||
.focused($focusedField, equals: .username)
|
||||
}
|
||||
HStack {
|
||||
Text("Password")
|
||||
.frame(minWidth: 100, alignment: .trailing)
|
||||
SecureField("Required", text: $password)
|
||||
.focused($focusedField, equals: .password)
|
||||
}
|
||||
if appState.authError != nil {
|
||||
HStack {
|
||||
|
|
|
|||
Loading…
Reference in a new issue