Storage chip for identity card

This commit is contained in:
Kaede Akino committed 2026-09-21 16:48:51 +08:00
1 parent 4cb443ccfc
commit e59aa2cbc6
2 files changed
+23

No files matched your search

@@ -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 {
@@ -1737,6 +1737,10 @@ private struct IdentityCard: View {
case .notConfigured:
EmptyView()
}
CardChip(
text: identity.passwordStorage.displayName,
symbol: identity.passwordStorage.symbol
)
}
if identity.usesKey {