-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Selfie and Liveness Image Sizes, Fix Layout for Small Screen Devi…
…ces (#266) * Fixed Missing Document Type (#264) * added missing document type in document jobs * Update CHANGELOG.md * add new submission status icons for success and failed states. * remove setting initial value for user instruction. * handle multiple faces detected and throw an error * change order of face validator so that luminance is checked before head position. * reduce the stroke size of the face in bounds indicator. * remove done button and hide cancel button if submission was successful. * use new status icons in status view. * add a placeholder for api error 2214 * update selfie actions view parameters * restore camera manager to have accessible initializer. add camera session size preset for selfie capture image * code formatting and set line limit of 2 to user instructions title. * change capture screen layout to accommodate small screen devices. remove cancel delegate method from selfie result. * dismiss the selfie capture when submission is successful. --------- Co-authored-by: Juma Allan <[email protected]>
- Loading branch information
Showing
27 changed files
with
149 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,6 @@ struct ProductCell<Content: View>: View { | |
} | ||
} | ||
} | ||
.environment(\.modalMode, $isPresented) | ||
} | ||
) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 26 additions & 13 deletions
39
Sources/SmileID/Classes/SelfieCapture/View/SelfieActionsView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,39 @@ | ||
import SwiftUI | ||
|
||
struct SelfieActionsView: View { | ||
var processingState: ProcessingState | ||
var captureState: EnhancedSmartSelfieViewModel.SelfieCaptureState | ||
var retryAction: () -> Void | ||
var doneAction: () -> Void | ||
var cancelAction: () -> Void | ||
|
||
var body: some View { | ||
VStack { | ||
Spacer() | ||
switch processingState { | ||
case .inProgress: | ||
EmptyView() | ||
case .success: | ||
SmileButton(title: "Action.Done") { | ||
doneAction() | ||
} | ||
case .error: | ||
SmileButton(title: "Confirmation.Retry") { | ||
retryAction() | ||
switch captureState { | ||
case .capturingSelfie: | ||
cancelButton | ||
case .processing(let processingState): | ||
switch processingState { | ||
case .inProgress: | ||
cancelButton | ||
case .success: | ||
EmptyView() | ||
case .error: | ||
SmileButton(title: "Confirmation.Retry") { | ||
retryAction() | ||
} | ||
cancelButton | ||
} | ||
} | ||
} | ||
.padding(.horizontal, 65) | ||
} | ||
|
||
var cancelButton: some View { | ||
Button { | ||
cancelAction() | ||
} label: { | ||
Text(SmileIDResourcesHelper.localizedString(for: "Action.Cancel")) | ||
.font(SmileID.theme.button) | ||
.foregroundColor(SmileID.theme.error) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.