mirror of
https://github.com/bitwarden/ios.git
synced 2025-12-10 17:46:07 -06:00
[PM-27045] Explicitly specify unlock method (#2047)
This commit is contained in:
parent
d8b5dc94d8
commit
6c9d2e9f22
@ -217,9 +217,9 @@ struct SettingsView: View {
|
|||||||
private func biometricsToggleText(_ biometryType: BiometricAuthenticationType) -> String {
|
private func biometricsToggleText(_ biometryType: BiometricAuthenticationType) -> String {
|
||||||
switch biometryType {
|
switch biometryType {
|
||||||
case .faceID:
|
case .faceID:
|
||||||
Localizations.unlockWith(Localizations.faceID)
|
Localizations.unlockWithFaceID
|
||||||
case .touchID:
|
case .touchID:
|
||||||
Localizations.unlockWith(Localizations.touchID)
|
Localizations.unlockWithTouchID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -182,9 +182,11 @@
|
|||||||
"SyncVaultNow" = "Sync vault now";
|
"SyncVaultNow" = "Sync vault now";
|
||||||
"TouchID" = "Touch ID";
|
"TouchID" = "Touch ID";
|
||||||
"TwoStepLogin" = "Two-step login";
|
"TwoStepLogin" = "Two-step login";
|
||||||
"UnlockWith" = "Unlock with %1$@";
|
"UnlockWithBiometrics" = "Unlock with biometrics";
|
||||||
|
"UnlockWithFaceID" = "Unlock with Face ID";
|
||||||
|
"UnlockWithTouchID" = "Unlock with Touch ID";
|
||||||
|
"UnlockWithOpticID" = "Unlock with Optic ID";
|
||||||
"UnlockWithPIN" = "Unlock with PIN code";
|
"UnlockWithPIN" = "Unlock with PIN code";
|
||||||
"UnlockWithUnknownBiometrics" = "Unlock with biometrics";
|
|
||||||
"Validating" = "Validating";
|
"Validating" = "Validating";
|
||||||
"VerificationCode" = "Verification code";
|
"VerificationCode" = "Verification code";
|
||||||
"ViewItem" = "View item";
|
"ViewItem" = "View item";
|
||||||
|
|||||||
@ -61,13 +61,13 @@ struct VaultUnlockSetupState: Equatable {
|
|||||||
case let .biometrics(type):
|
case let .biometrics(type):
|
||||||
switch type {
|
switch type {
|
||||||
case .faceID:
|
case .faceID:
|
||||||
Localizations.unlockWith(Localizations.faceID)
|
Localizations.unlockWithFaceID
|
||||||
case .opticID:
|
case .opticID:
|
||||||
Localizations.unlockWith(Localizations.opticID)
|
Localizations.unlockWithOpticID
|
||||||
case .touchID:
|
case .touchID:
|
||||||
Localizations.unlockWith(Localizations.touchID)
|
Localizations.unlockWithTouchID
|
||||||
case .unknown:
|
case .unknown:
|
||||||
Localizations.unlockWithUnknownBiometrics
|
Localizations.unlockWithBiometrics
|
||||||
}
|
}
|
||||||
case .pin:
|
case .pin:
|
||||||
Localizations.unlockWithPIN
|
Localizations.unlockWithPIN
|
||||||
|
|||||||
@ -104,11 +104,11 @@ class AccountSecurityViewTests: BitwardenTestCase {
|
|||||||
func test_biometricsToggle() throws {
|
func test_biometricsToggle() throws {
|
||||||
processor.state.biometricUnlockStatus = .available(.faceID, enabled: false)
|
processor.state.biometricUnlockStatus = .available(.faceID, enabled: false)
|
||||||
_ = try subject.inspect().find(
|
_ = try subject.inspect().find(
|
||||||
toggleWithAccessibilityLabel: Localizations.unlockWith(Localizations.faceID),
|
toggleWithAccessibilityLabel: Localizations.unlockWithFaceID,
|
||||||
)
|
)
|
||||||
processor.state.biometricUnlockStatus = .available(.touchID, enabled: true)
|
processor.state.biometricUnlockStatus = .available(.touchID, enabled: true)
|
||||||
_ = try subject.inspect().find(
|
_ = try subject.inspect().find(
|
||||||
toggleWithAccessibilityLabel: Localizations.unlockWith(Localizations.touchID),
|
toggleWithAccessibilityLabel: Localizations.unlockWithTouchID,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ class AccountSecurityViewTests: BitwardenTestCase {
|
|||||||
processor.state.biometricUnlockStatus = .notAvailable
|
processor.state.biometricUnlockStatus = .notAvailable
|
||||||
XCTAssertNil(
|
XCTAssertNil(
|
||||||
try? subject.inspect().find(
|
try? subject.inspect().find(
|
||||||
toggleWithAccessibilityLabel: Localizations.unlockWith(Localizations.faceID),
|
toggleWithAccessibilityLabel: Localizations.unlockWithFaceID,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -255,13 +255,13 @@ struct AccountSecurityView: View {
|
|||||||
private func biometricsToggleText(_ biometryType: BiometricAuthenticationType) -> String {
|
private func biometricsToggleText(_ biometryType: BiometricAuthenticationType) -> String {
|
||||||
switch biometryType {
|
switch biometryType {
|
||||||
case .faceID:
|
case .faceID:
|
||||||
Localizations.unlockWith(Localizations.faceID)
|
Localizations.unlockWithFaceID
|
||||||
case .opticID:
|
case .opticID:
|
||||||
Localizations.unlockWith(Localizations.opticID)
|
Localizations.unlockWithOpticID
|
||||||
case .touchID:
|
case .touchID:
|
||||||
Localizations.unlockWith(Localizations.touchID)
|
Localizations.unlockWithTouchID
|
||||||
case .unknown:
|
case .unknown:
|
||||||
Localizations.unlockWithUnknownBiometrics
|
Localizations.unlockWithBiometrics
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user