This commit is contained in:
Daniel Arantes Loverde
2026-06-03 14:31:11 -03:00
parent 69dd67b8a5
commit 74848192a0
28 changed files with 134 additions and 617 deletions

View File

@@ -25,19 +25,11 @@ struct OtpView: View {
var body: some View {
ScrollView {
VStack(spacing: 0) {
#if os(Android)
SwiftUI.Image("pedifoods", bundle: .module)
.resizable()
.scaledToFit()
.frame(width: 74, height: 74)
.padding(.top, 140)
#else
SwiftUI.Image("pedifoods")
.resizable()
.scaledToFit()
.frame(width: 74, height: 74)
.padding(.top, 140)
#endif
Text("Verificação")
.font(AppTypography.heading1)
@@ -72,6 +64,10 @@ struct OtpView: View {
if trimmed != newValue {
otp = trimmed
}
if trimmed.count == 8 && !isLoading {
isOtpFocused = false
validateOtp()
}
}
}
.frame(height: 204)
@@ -92,6 +88,7 @@ struct OtpView: View {
Button(resendButtonTitle) {
resendOtp()
}
.buttonStyle(.plain)
.font(AppTypography.heading3)
.foregroundStyle(AppColors.primary)
.disabled(isResending || !canResend)
@@ -101,6 +98,7 @@ struct OtpView: View {
Button("Colar código") {
pasteOtpFromClipboard()
}
.buttonStyle(.plain)
.font(AppTypography.heading3)
.foregroundStyle(AppColors.primary)
.padding(.top, 22)
@@ -124,6 +122,7 @@ struct OtpView: View {
.padding(.bottom, 18)
}
}
.scrollDismissesKeyboard(.interactively)
.background(AppColors.backgroundLight)
.ignoresSafeArea()
.onAppear {