diff --git a/MomCare+/MomCare+/Views/OnboardingScreens/OTPScreenView.swift b/MomCare+/MomCare+/Views/OnboardingScreens/OTPScreenView.swift index 3298e160..0bd75230 100644 --- a/MomCare+/MomCare+/Views/OnboardingScreens/OTPScreenView.swift +++ b/MomCare+/MomCare+/Views/OnboardingScreens/OTPScreenView.swift @@ -109,6 +109,16 @@ struct OTPScreenView: View { .accessibilityHidden(true) hiddenOTPTextField + .onSubmit { + Task { + do { + try await handleSubmit() + } catch { + controlState.error = error + } + } + } + .submitLabel(.done) } .contentShape(Rectangle()) .onTapGesture { @@ -132,6 +142,9 @@ struct OTPScreenView: View { .otpTextFieldStyle(isFocused: $isFieldFocused) .onChange(of: otpString) { _, newValue in sanitizeOTP(newValue) + if otpString.count == otpLength { + isFieldFocused = false + } } } } diff --git a/MomCare+/MomCare+/Views/ProfileScreens/Legal&Compliance/GlobalRightsView.swift b/MomCare+/MomCare+/Views/ProfileScreens/Legal&Compliance/GlobalRightsView.swift index b50f2ee2..4591cf4a 100644 --- a/MomCare+/MomCare+/Views/ProfileScreens/Legal&Compliance/GlobalRightsView.swift +++ b/MomCare+/MomCare+/Views/ProfileScreens/Legal&Compliance/GlobalRightsView.swift @@ -60,7 +60,7 @@ struct GlobalRightsView: View { .foregroundColor(.secondary) .multilineTextAlignment(.center) - Text("privacy@momcare.com") + Text("support.momcare@vision-labs.site") .font(.headline) .fontWeight(.semibold) .foregroundColor(accentColor) @@ -68,7 +68,7 @@ struct GlobalRightsView: View { .padding(.horizontal, 24) .background(Color.gray.opacity(0.1)) .clipShape(Capsule()) - .accessibilityLabel("Contact email: privacy@momcare.com") + .accessibilityLabel("Contact email: support.momcare@vision-labs.site") } .padding(.vertical, 24) } diff --git a/MomCare+/MomCare+/Views/ProfileScreens/ProfileView.swift b/MomCare+/MomCare+/Views/ProfileScreens/ProfileView.swift index 422c457f..86fdc3a5 100644 --- a/MomCare+/MomCare+/Views/ProfileScreens/ProfileView.swift +++ b/MomCare+/MomCare+/Views/ProfileScreens/ProfileView.swift @@ -112,6 +112,7 @@ struct ProfileView: View { @EnvironmentObject private var authenticationService: AuthenticationService @EnvironmentObject private var controlState: ControlState + @Environment(\.openURL) private var openURL private var footerView: some View { VStack(spacing: 4) { @@ -121,6 +122,12 @@ struct ProfileView: View { Text("Connect with Us") .foregroundStyle(Color("primaryAppColor")) .fontWeight(.medium) + .onTapGesture { + let url = "mailto:support.momcare@vision-labs.site" + if let mailURL = URL(string: url) { + openURL(mailURL) + } + } } .frame(maxWidth: .infinity) .multilineTextAlignment(.center)