Skip to content

Commit

Permalink
Cancel upload alert
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantelis Giazitsis committed Dec 19, 2024
1 parent e855f93 commit 2fe56e7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ class PhotoVerificationStateViewModel: ObservableObject {
}

func handleCancelUploadTap() {

let yesAction: AlertHelper.AlertObject.Action = (LocalizableString.PhotoVerification.yesCancel.localized, { _ in })
let alertObject = AlertHelper.AlertObject(title: LocalizableString.PhotoVerification.cancelUpload.localized,
message: LocalizableString.PhotoVerification.cancelUploadAlertMessage.localized,
cancelActionTitle: LocalizableString.back.localized,
cancelAction: {},
okAction: yesAction)

AlertHelper().showAlert(alertObject)

}

func handleImageTap() {
Expand Down
22 changes: 22 additions & 0 deletions wxm-ios/Resources/Localizable/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -5699,6 +5699,17 @@
}
}
},
"photo_verification_cancel_upload_alert_message" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Are you sure you want to cancel the upload and lose the photos?\nYou will need to retake them."
}
}
}
},
"photo_verification_check_clear_view" : {
"extractionState" : "manual",
"localizations" : {
Expand Down Expand Up @@ -6194,6 +6205,17 @@
}
}
},
"photo_verification_yes_cancel" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Yes, cancel"
}
}
}
},
"photo_verification_your_camera_will_open" : {
"extractionState" : "manual",
"localizations" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ extension LocalizableString {
case exitPhotoVerificationMinimumPhotosText
case uploading
case cancelUpload
case cancelUploadAlertMessage
case yesCancel
case retryUpload
case uploadErrorDescription
}
Expand Down Expand Up @@ -173,6 +175,10 @@ extension LocalizableString.PhotoVerification: WXMLocalizable {
"photo_verification_uploading"
case .cancelUpload:
"photo_verification_cancel_upload"
case .cancelUploadAlertMessage:
"photo_verification_cancel_upload_alert_message"
case .yesCancel:
"photo_verification_yes_cancel"
case .retryUpload:
"photo_verification_retry_upload"
case .uploadErrorDescription:
Expand Down

0 comments on commit 2fe56e7

Please sign in to comment.