mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Reset Recovery Key Screen (#2648)
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
+16
-2
@@ -64,6 +64,12 @@ struct SecureBackupRecoveryKeyScreen: View {
|
||||
case .setupRecovery, .changeRecovery:
|
||||
recoveryCreatedActionButtons
|
||||
case .fixRecovery:
|
||||
incompleteVerificationActionButtons
|
||||
}
|
||||
}
|
||||
|
||||
private var incompleteVerificationActionButtons: some View {
|
||||
VStack(spacing: 16) {
|
||||
Button {
|
||||
context.send(viewAction: .confirmKey)
|
||||
} label: {
|
||||
@@ -71,6 +77,14 @@ struct SecureBackupRecoveryKeyScreen: View {
|
||||
}
|
||||
.buttonStyle(.compound(.primary))
|
||||
.disabled(context.confirmationRecoveryKey.isEmpty)
|
||||
|
||||
Button {
|
||||
context.send(viewAction: .resetKey)
|
||||
} label: {
|
||||
Text(L10n.screenIdentityConfirmationCreateNewRecoveryKey)
|
||||
.padding(.vertical, 14)
|
||||
}
|
||||
.buttonStyle(.compound(.plain))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +141,7 @@ struct SecureBackupRecoveryKeyScreen: View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text(L10n.commonRecoveryKey)
|
||||
.foregroundColor(.compound.textPrimary)
|
||||
.font(.compound.bodySM)
|
||||
.font(.compound.bodySMSemibold)
|
||||
|
||||
Group {
|
||||
if context.viewState.recoveryKey == nil {
|
||||
@@ -180,7 +194,7 @@ struct SecureBackupRecoveryKeyScreen: View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text(L10n.commonRecoveryKey)
|
||||
.foregroundColor(.compound.textPrimary)
|
||||
.font(.compound.bodySM)
|
||||
.font(.compound.bodySMSemibold)
|
||||
|
||||
SecureField(L10n.screenRecoveryKeyConfirmKeyPlaceholder, text: $context.confirmationRecoveryKey)
|
||||
.textContentType(.password) // Not ideal but stops random suggestions
|
||||
|
||||
Reference in New Issue
Block a user