Stabilize iOS/watchOS/tvOS apps and add cross-platform audit remediation

This commit is contained in:
Trey t
2026-02-11 12:54:40 -06:00
parent e40275e694
commit acce712261
77 changed files with 2940 additions and 765 deletions

View File

@@ -12,7 +12,7 @@ struct LoginView: View {
@State var password: String = ""
@Environment(\.dismiss) var dismiss
let completion: (() -> Void)
@State var doingNetworkShit: Bool = false
@State var isLoggingIn: Bool = false
@State var errorTitle = ""
@State var errorMessage = ""
@@ -23,13 +23,17 @@ struct LoginView: View {
VStack {
TextField("Email", text: $email)
.textContentType(.username)
.autocapitalization(.none)
.textInputAutocapitalization(.never)
.autocorrectionDisabled(true)
.keyboardType(.emailAddress)
.padding()
.background(Color.white)
.cornerRadius(8)
.padding(.horizontal)
.padding(.top, 25)
.foregroundStyle(.black)
.accessibilityLabel("Email")
.submitLabel(.next)
SecureField("Password", text: $password)
.textContentType(.password)
@@ -37,10 +41,13 @@ struct LoginView: View {
.background(Color.white)
.cornerRadius(8)
.padding(.horizontal)
.autocapitalization(.none)
.textInputAutocapitalization(.never)
.autocorrectionDisabled(true)
.foregroundStyle(.black)
.accessibilityLabel("Password")
.submitLabel(.go)
if doingNetworkShit {
if isLoggingIn {
ProgressView("Logging In")
.padding()
.foregroundColor(.white)
@@ -58,6 +65,8 @@ struct LoginView: View {
.padding()
.frame(maxWidth: .infinity)
.disabled(password.isEmpty || email.isEmpty)
.accessibilityLabel("Log in")
.accessibilityHint("Logs in using the entered email and password")
}
Spacer()
@@ -68,11 +77,12 @@ struct LoginView: View {
.resizable()
.edgesIgnoringSafeArea(.all)
.scaledToFill()
.accessibilityHidden(true)
)
.alert(errorTitle, isPresented: $hasError, actions: {
}, message: {
Text(errorMessage)
})
}
@@ -81,9 +91,9 @@ struct LoginView: View {
"email": email,
"password": password
]
doingNetworkShit = true
isLoggingIn = true
UserStore.shared.login(postData: postData, completion: { success in
doingNetworkShit = false
isLoggingIn = false
if success {
completion()
dismiss()
@@ -103,4 +113,3 @@ struct LoginView_Previews: PreviewProvider {
})
}
}