Directly show Recovery Key and Encryption Reset screens from the home screen banner. (#3482)

This commit is contained in:
Doug
2024-11-04 17:21:36 +00:00
committed by GitHub
parent 8e26718d0b
commit 6190a03afc
10 changed files with 130 additions and 21 deletions
@@ -56,14 +56,21 @@ struct HomeScreenRecoveryKeyConfirmationBanner: View {
var buttons: some View {
VStack(spacing: 16) {
Button(actionTitle) {
context.send(viewAction: .confirmRecoveryKey)
context.send(viewAction: .manageRecoveryKey)
}
.frame(maxWidth: .infinity)
.buttonStyle(.compound(.primary, size: .medium))
.accessibilityIdentifier(A11yIdentifiers.homeScreen.recoveryKeyConfirmationBannerContinue)
if !requiresExtraAccountSetup {
// Missing encryption reset button to goes here once the flow exists.
Button {
context.send(viewAction: .resetEncryption)
} label: {
Text(L10n.confirmRecoveryKeyBannerSecondaryButtonTitle)
.padding(.vertical, 7)
.frame(maxWidth: .infinity)
}
.buttonStyle(.compound(.plain, size: .medium))
}
}
}