bck
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user