From cd59e497fb7bfe4ea1a74ec34792f65020da67ae Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:27:53 +0100 Subject: [PATCH] Tweak EncryptionReset, IdentityConfirmation and SecureBackupRecovery screens. (#3391) --- .../en.lproj/Localizable.strings | 2 +- ElementX/Sources/Generated/Strings.swift | 2 +- .../View/EncryptionResetScreen.swift | 10 +++----- .../View/IdentityConfirmationScreen.swift | 25 ++++++++----------- .../View/SecureBackupRecoveryKeyScreen.swift | 8 ------ ...est_encryptionResetScreen-iPad-en-GB.1.png | 4 +-- ...st_encryptionResetScreen-iPad-pseudo.1.png | 4 +-- ...ncryptionResetScreen-iPhone-16-en-GB.1.png | 4 +-- ...cryptionResetScreen-iPhone-16-pseudo.1.png | 4 +-- ...dentityConfirmationScreen-iPad-en-GB.1.png | 4 +-- ...entityConfirmationScreen-iPad-pseudo.1.png | 4 +-- ...tyConfirmationScreen-iPhone-16-en-GB.1.png | 4 +-- ...yConfirmationScreen-iPhone-16-pseudo.1.png | 4 +-- ...ecoveryKeyScreen-iPad-en-GB.Incomplete.png | 4 +-- ...coveryKeyScreen-iPad-pseudo.Incomplete.png | 4 +-- ...ryKeyScreen-iPhone-16-en-GB.Incomplete.png | 4 +-- ...yKeyScreen-iPhone-16-pseudo.Incomplete.png | 4 +-- 17 files changed, 39 insertions(+), 56 deletions(-) diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index 6416ef7e17..87127851c4 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -477,7 +477,7 @@ "screen_edit_profile_updating_details" = "Updating profile…"; "screen_encryption_reset_action_continue_reset" = "Continue reset"; "screen_encryption_reset_bullet_1" = "Your account details, contacts, preferences, and chat list will be kept"; -"screen_encryption_reset_bullet_2" = "You will lose your existing message history unless it is stored on another device"; +"screen_encryption_reset_bullet_2" = "You will lose any message history that’s stored only on the server"; "screen_encryption_reset_bullet_3" = "You will need to verify all your existing devices and contacts again"; "screen_encryption_reset_footer" = "Only reset your identity if you don’t have access to another signed-in device and you’ve lost your recovery key."; "screen_encryption_reset_title" = "Can't confirm? You’ll need to reset your identity."; diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index f09ba5be42..14ddac8081 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -1123,7 +1123,7 @@ internal enum L10n { internal static var screenEncryptionResetActionContinueReset: String { return L10n.tr("Localizable", "screen_encryption_reset_action_continue_reset") } /// Your account details, contacts, preferences, and chat list will be kept internal static var screenEncryptionResetBullet1: String { return L10n.tr("Localizable", "screen_encryption_reset_bullet_1") } - /// You will lose your existing message history unless it is stored on another device + /// You will lose any message history that’s stored only on the server internal static var screenEncryptionResetBullet2: String { return L10n.tr("Localizable", "screen_encryption_reset_bullet_2") } /// You will need to verify all your existing devices and contacts again internal static var screenEncryptionResetBullet3: String { return L10n.tr("Localizable", "screen_encryption_reset_bullet_3") } diff --git a/ElementX/Sources/Screens/EncryptionReset/EncryptionResetScreen/View/EncryptionResetScreen.swift b/ElementX/Sources/Screens/EncryptionReset/EncryptionResetScreen/View/EncryptionResetScreen.swift index ab03039bcc..54f40c4bfc 100644 --- a/ElementX/Sources/Screens/EncryptionReset/EncryptionResetScreen/View/EncryptionResetScreen.swift +++ b/ElementX/Sources/Screens/EncryptionReset/EncryptionResetScreen/View/EncryptionResetScreen.swift @@ -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) } diff --git a/ElementX/Sources/Screens/Onboarding/IdentityConfirmationScreen/View/IdentityConfirmationScreen.swift b/ElementX/Sources/Screens/Onboarding/IdentityConfirmationScreen/View/IdentityConfirmationScreen.swift index 0a4120dae4..fc91466573 100644 --- a/ElementX/Sources/Screens/Onboarding/IdentityConfirmationScreen/View/IdentityConfirmationScreen.swift +++ b/ElementX/Sources/Screens/Onboarding/IdentityConfirmationScreen/View/IdentityConfirmationScreen.swift @@ -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)) } + Button(L10n.screenIdentityConfirmationCannotConfirm) { + context.send(viewAction: .reset) + } + .buttonStyle(.compound(.secondary)) + if shouldShowSkipButton { - Button(L10n.actionSkip) { + Button("\(L10n.actionSkip) 🙉") { context.send(viewAction: .skip) } .buttonStyle(.compound(.plain)) + .padding(.vertical, 14) } - - Button(L10n.screenIdentityConfirmationCannotConfirm) { - context.send(viewAction: .reset) - } - .buttonStyle(.compound(.plain)) - .padding(.vertical, 14) } } diff --git a/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/View/SecureBackupRecoveryKeyScreen.swift b/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/View/SecureBackupRecoveryKeyScreen.swift index f9d17174a6..c3c0bd1ac5 100644 --- a/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/View/SecureBackupRecoveryKeyScreen.swift +++ b/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/View/SecureBackupRecoveryKeyScreen.swift @@ -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)) } } diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPad-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPad-en-GB.1.png index e72f4cff6b..6c6e33a78e 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPad-en-GB.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPad-en-GB.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d7b9f1160cb8fd978c7402ead8460e56939c5ab4ee7b8285131b00307426183e -size 159516 +oid sha256:35ff1ec5ba08bdcfe19c68655ea38c0a679ee896aee25b188b9667439e37c605 +size 157122 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPad-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPad-pseudo.1.png index 5998a09d05..dbe3171aa9 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPad-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPad-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:625e6b9fccf62cbe1c71aa454f8cd66742f881c96bd661f8418173e7933d5af0 -size 218034 +oid sha256:01977f47e883168370867511229e4357a7a9c3fb5b1ec623fc618c6627c0b1c4 +size 213205 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPhone-16-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPhone-16-en-GB.1.png index b6243f868c..43ff30697b 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPhone-16-en-GB.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPhone-16-en-GB.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1068d4904a804b49209262a271bfa42ee77e69b252af4ccf0cd400e5a91cf5f5 -size 108725 +oid sha256:04e69f0f8f95eef2e94d6b5ff06340b2961c19f82a65285330e8aa4299d4b7e3 +size 107557 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPhone-16-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPhone-16-pseudo.1.png index f2062a2523..d0f4fa5900 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPhone-16-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_encryptionResetScreen-iPhone-16-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:50b378ce2f752940b0ea0ec64c1965a6e1bc73a9b234505abaec993aea3634af -size 168764 +oid sha256:8bdd88fa80104946db0c54b75d0a2b95d1283152f6a640b4de24428df41401ff +size 164076 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPad-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPad-en-GB.1.png index 9168f11f5f..e3d2a9b16b 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPad-en-GB.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPad-en-GB.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2914636f691599f5f379bc099e20e5727d1222479524c0a6b4ad670dd70daa05 -size 112687 +oid sha256:ce8e325ce94e195a17c60920e9f1a51a6aa273a10e1a0b783783def5f7bcf47c +size 115820 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPad-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPad-pseudo.1.png index 08c759b75b..0a6b3f63f4 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPad-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPad-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bae19c911103b9b2742a1f78fc0d63ba9e8b26cd35ea9e02263f2b51698a9b07 -size 125129 +oid sha256:99629bdfc2cd08f9cd928f67f4b072acc3eef1f515fa835c3878c79038accaef +size 128224 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPhone-16-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPhone-16-en-GB.1.png index ba383dfaf5..d4630e8912 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPhone-16-en-GB.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPhone-16-en-GB.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cfd45923268bc5e7755b17597290cf39451fa92abe4b514164d19fc21f934be5 -size 67005 +oid sha256:9e3b567e97c4f410a8a8b4e834957ea32336ca611cad6ccd84c2c38495dafdfa +size 69280 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPhone-16-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPhone-16-pseudo.1.png index f3434c808d..297cae6c2b 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPhone-16-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_identityConfirmationScreen-iPhone-16-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:75c432bd34524fe3bc496b6b3306010bfdf4b51b00bcbd990286a01da8f5d9a0 -size 85907 +oid sha256:cba19a5da2430d83fa60f06ea8c569570383dbe6493745bde8e2d758a047696e +size 87946 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPad-en-GB.Incomplete.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPad-en-GB.Incomplete.png index f4524ff43a..5ffaca6543 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPad-en-GB.Incomplete.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPad-en-GB.Incomplete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e8373d1d1b85980b3701f809b47e923ef15ca7091337ed2ba795e69325d9acb9 -size 113493 +oid sha256:ba23d702ec00bf2e78b2b8a5ffa65231afd4447198249e68febbd0cb8b6b85ec +size 107062 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPad-pseudo.Incomplete.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPad-pseudo.Incomplete.png index 8de933e4ec..1a9cf0a09d 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPad-pseudo.Incomplete.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPad-pseudo.Incomplete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f693c37838f16f111c8b5512658bf99ba0996bff89460cbb4a25d38cc308966 -size 130681 +oid sha256:1d824857d656ee6768664a0b196b3baacf2c8422a5480f5df8ac9a50af93115b +size 122503 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPhone-16-en-GB.Incomplete.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPhone-16-en-GB.Incomplete.png index 96d7106a28..8d1a0e2f90 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPhone-16-en-GB.Incomplete.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPhone-16-en-GB.Incomplete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61d602bf32672cc1e432940a0d01c329095ba6d96d4c2db9f1ce7727fa91bf1a -size 67746 +oid sha256:5d16d499cb8f81e67e7e4fe001bf29a139494f62f6771237c8165953ff9b7beb +size 61510 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPhone-16-pseudo.Incomplete.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPhone-16-pseudo.Incomplete.png index 52917f9746..0a23a94084 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPhone-16-pseudo.Incomplete.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPhone-16-pseudo.Incomplete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:417a2c667d4d448c6dd04b097eee9c271de1be5915fd14fe6dbf909ecb6adc82 -size 91971 +oid sha256:df53744db3f78f32a376d79e2907a9c98cf265abb62ac86ec457589e66b4b6b8 +size 81702