diff --git a/TFI/Features/Keychain/MobileCredentialsView.swift b/TFI/Features/Keychain/MobileCredentialsView.swift index 5feef1f7..3e92ea6e 100644 --- a/TFI/Features/Keychain/MobileCredentialsView.swift +++ b/TFI/Features/Keychain/MobileCredentialsView.swift @@ -238,6 +238,9 @@ private struct MobileIdentityCredentialCard: View { case .notConfigured: EmptyView() } + MobileCardChip( + text: identity.passwordStorage.mobileDisplayName, + symbol: identity.passwordStorage.mobileSymbol) } if identity.usesKey { if let key { @@ -264,6 +267,22 @@ private struct MobileIdentityCredentialCard: View { } } +extension PasswordStorage { + fileprivate var mobileDisplayName: String { + switch self { + case .thisDevice: String(localized: "This Device") + case .iCloud: String(localized: "iCloud") + } + } + + fileprivate var mobileSymbol: String { + switch self { + case .thisDevice: "lock.fill" + case .iCloud: "icloud.fill" + } + } +} + extension KeyStorage { fileprivate var mobileDisplayName: String { switch self { diff --git a/TFM/Features/Keychain/KeychainPageView.swift b/TFM/Features/Keychain/KeychainPageView.swift index d749bccf..00bbad3f 100644 --- a/TFM/Features/Keychain/KeychainPageView.swift +++ b/TFM/Features/Keychain/KeychainPageView.swift @@ -1737,6 +1737,10 @@ private struct IdentityCard: View { case .notConfigured: EmptyView() } + CardChip( + text: identity.passwordStorage.displayName, + symbol: identity.passwordStorage.symbol + ) } if identity.usesKey {