diff --git a/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/View/SecureBackupRecoveryKeyScreen.swift b/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/View/SecureBackupRecoveryKeyScreen.swift index 5110c7654..8b21c36f9 100644 --- a/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/View/SecureBackupRecoveryKeyScreen.swift +++ b/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/View/SecureBackupRecoveryKeyScreen.swift @@ -178,31 +178,19 @@ struct SecureBackupRecoveryKeyScreen: View { } private var confirmRecoveryKeySection: some View { - VStack(alignment: .leading, spacing: 8) { - Text(L10n.commonRecoveryKey) - .foregroundColor(.compound.textPrimary) - .font(.compound.bodySMSemibold) - - SecureField(L10n.screenRecoveryKeyConfirmKeyPlaceholder, text: $context.confirmationRecoveryKey) - .tint(.compound.iconAccentTertiary) - .frame(maxWidth: .infinity) - .padding() - .background(Color.compound.bgSubtleSecondaryLevel0) - .clipShape(RoundedRectangle(cornerRadius: 8)) - .id(textFieldIdentifier) - .focused($focused) - .submitLabel(.done) - .onSubmit { - context.send(viewAction: .confirmKey) - } - .accessibilityIdentifier(A11yIdentifiers.secureBackupRecoveryKeyScreen.recoveryKeyField) - - if let subtitle = context.viewState.recoveryKeySubtitle { - Text(subtitle) - .foregroundColor(.compound.textSecondary) - .font(.compound.bodySM) + SecureField(L10n.screenRecoveryKeyConfirmKeyPlaceholder, text: $context.confirmationRecoveryKey) + .focused($focused) + .textFieldStyle(.compound(.plain(.secure(hideLabel: L10n.a11yHidePassword, showLabel: L10n.a11yShowPassword)), + labelText: L10n.commonRecoveryKey, + footerText: context.viewState.recoveryKeySubtitle, + accessibilityIdentifier: A11yIdentifiers.secureBackupRecoveryKeyScreen.recoveryKeyField)) + .textInputAutocapitalization(.never) + .autocorrectionDisabled() + .submitLabel(.done) + .onSubmit { + context.send(viewAction: .confirmKey) } - } + .id(textFieldIdentifier) } } diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPad-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPad-en-GB.png index 2b44df68d..f69dd5fbc 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPad-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:03c010893b3c40f14511b72f8e950ec51058103e19abf8c41a80931f1763054a -size 104073 +oid sha256:4793acf1bdd66bcd53e80b406533c36c6d24fbe4c94465d3ef36d4ca91e3515c +size 106814 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPad-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPad-pseudo.png index 146f7043b..29a76f719 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPad-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPad-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:437e550de3c9ec1e6d64bd74e82f17c8b35b927fcf47033a0ebce4f2ce822e4d -size 117963 +oid sha256:08b20475356dc4a07c98b807d76a9774e72b7c0917ee1283efd5c4c379eecc89 +size 121744 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPhone-en-GB.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPhone-en-GB.png index 1fc5edea9..d87e6defe 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPhone-en-GB.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:23e99c6685ab645c5edb3005e171218d96abeef1d955da17aab112330116e9b6 -size 60688 +oid sha256:b49168b74b4db5b175c6bee22a45809ce444beb10725045d987d73e9cc91525a +size 62958 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPhone-pseudo.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPhone-pseudo.png index d2a0d2aef..ed32ab042 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPhone-pseudo.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/secureBackupRecoveryKeyScreen.Incomplete-iPhone-pseudo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7b6bea3f15bb8b30731a2e48b4084538290f6d3e70733eaf7c8174bc490fcd8 -size 80957 +oid sha256:125c57f171d1a4178d645de5e6e47c92763fdf0868871f15e78a181b84bd1ab5 +size 84092 diff --git a/compound-ios/Sources/Compound/BaseStyles/CompoundTextFieldStyles.swift b/compound-ios/Sources/Compound/BaseStyles/CompoundTextFieldStyles.swift index 913e27005..e94428257 100644 --- a/compound-ios/Sources/Compound/BaseStyles/CompoundTextFieldStyles.swift +++ b/compound-ios/Sources/Compound/BaseStyles/CompoundTextFieldStyles.swift @@ -233,7 +233,7 @@ public struct CompoundTextFieldStyle: @MainActor TextFieldStyle { isSecureTextRevealed.toggle() secureTextField?.isSecureTextEntry = !isSecureTextRevealed } label: { - CompoundIcon(isSecureTextRevealed ? \.visibilityOff : \.visibilityOn, + CompoundIcon(isSecureTextRevealed ? \.visibilityOn : \.visibilityOff, size: .medium, relativeTo: .compound.bodyLG) .foregroundStyle(.compound.iconSecondary) diff --git a/compound-ios/Tests/CompoundTests/__Snapshots__/PreviewTests/compoundTextFieldStyle.iPad-en-US-0.png b/compound-ios/Tests/CompoundTests/__Snapshots__/PreviewTests/compoundTextFieldStyle.iPad-en-US-0.png index 923f603c1..536be53b7 100644 --- a/compound-ios/Tests/CompoundTests/__Snapshots__/PreviewTests/compoundTextFieldStyle.iPad-en-US-0.png +++ b/compound-ios/Tests/CompoundTests/__Snapshots__/PreviewTests/compoundTextFieldStyle.iPad-en-US-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbd4787ecee53978e01e90782f8e8704a424b486ed27f06fece2e5e5113b86aa -size 241919 +oid sha256:b57abd80aba38391fbbd911f786fed1836caa60ffa3dd7af715472f44bc2b3de +size 242911 diff --git a/compound-ios/Tests/CompoundTests/__Snapshots__/PreviewTests/compoundTextFieldStyle.iPhone-en-US-0.png b/compound-ios/Tests/CompoundTests/__Snapshots__/PreviewTests/compoundTextFieldStyle.iPhone-en-US-0.png index b3decedc7..05dc8b035 100644 --- a/compound-ios/Tests/CompoundTests/__Snapshots__/PreviewTests/compoundTextFieldStyle.iPhone-en-US-0.png +++ b/compound-ios/Tests/CompoundTests/__Snapshots__/PreviewTests/compoundTextFieldStyle.iPhone-en-US-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:60ee1c44ab8ed1895c529c2c4d1bb749e6f71f73b3adbff2a67d0965c63af807 -size 150593 +oid sha256:f53a05a7d169748808ffeb7869dc84846bf30371c7800087b3b1ad6a17d26b24 +size 151511