mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Tweak EncryptionReset, IdentityConfirmation and SecureBackupRecovery screens. (#3391)
This commit is contained in:
+3
-7
@@ -71,13 +71,9 @@ struct EncryptionResetScreen: View {
|
||||
@ViewBuilder
|
||||
private func checkMarkItem(title: String, position: ListPosition, positive: Bool) -> some View {
|
||||
RoundedLabelItem(title: title, listPosition: position) {
|
||||
if positive {
|
||||
CompoundIcon(\.check)
|
||||
.foregroundColor(.compound.iconAccentPrimary)
|
||||
} else {
|
||||
CompoundIcon(\.close)
|
||||
.foregroundColor(.compound.iconCriticalPrimary)
|
||||
}
|
||||
CompoundIcon(positive ? \.check : \.info)
|
||||
.foregroundColor(positive ? .compound.iconAccentPrimary : .compound.iconSecondary)
|
||||
.alignmentGuide(.top) { _ in 2 }
|
||||
}
|
||||
.backgroundStyle(.compound.bgCanvasDefault)
|
||||
}
|
||||
|
||||
+12
-17
@@ -67,32 +67,27 @@ struct IdentityConfirmationScreen: View {
|
||||
context.send(viewAction: .otherDevice)
|
||||
}
|
||||
.buttonStyle(.compound(.primary))
|
||||
|
||||
if context.viewState.availableActions.contains(.recovery) {
|
||||
Button(L10n.screenIdentityConfirmationUseRecoveryKey) {
|
||||
context.send(viewAction: .recoveryKey)
|
||||
}
|
||||
.buttonStyle(.compound(.secondary))
|
||||
}
|
||||
} else if context.viewState.availableActions.contains(.recovery) {
|
||||
}
|
||||
|
||||
if context.viewState.availableActions.contains(.recovery) {
|
||||
Button(L10n.screenIdentityConfirmationUseRecoveryKey) {
|
||||
context.send(viewAction: .recoveryKey)
|
||||
}
|
||||
.buttonStyle(.compound(.primary))
|
||||
}
|
||||
|
||||
if shouldShowSkipButton {
|
||||
Button(L10n.actionSkip) {
|
||||
context.send(viewAction: .skip)
|
||||
}
|
||||
.buttonStyle(.compound(.plain))
|
||||
}
|
||||
|
||||
Button(L10n.screenIdentityConfirmationCannotConfirm) {
|
||||
context.send(viewAction: .reset)
|
||||
}
|
||||
.buttonStyle(.compound(.plain))
|
||||
.padding(.vertical, 14)
|
||||
.buttonStyle(.compound(.secondary))
|
||||
|
||||
if shouldShowSkipButton {
|
||||
Button("\(L10n.actionSkip) 🙉") {
|
||||
context.send(viewAction: .skip)
|
||||
}
|
||||
.buttonStyle(.compound(.plain))
|
||||
.padding(.vertical, 14)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-8
@@ -90,14 +90,6 @@ struct SecureBackupRecoveryKeyScreen: View {
|
||||
}
|
||||
.buttonStyle(.compound(.primary))
|
||||
.disabled(context.confirmationRecoveryKey.isEmpty)
|
||||
|
||||
Button {
|
||||
context.send(viewAction: .resetEncryption)
|
||||
} label: {
|
||||
Text(L10n.screenIdentityConfirmationCreateNewRecoveryKey)
|
||||
.padding(.vertical, 14)
|
||||
}
|
||||
.buttonStyle(.compound(.plain))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user