summaryrefslogtreecommitdiff
path: root/Hutch/Models/Meta.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Hutch/Models/Meta.swift')
-rw-r--r--Hutch/Models/Meta.swift8
1 files changed, 7 insertions, 1 deletions
diff --git a/Hutch/Models/Meta.swift b/Hutch/Models/Meta.swift
index c0434bc..91bd7e3 100644
--- a/Hutch/Models/Meta.swift
+++ b/Hutch/Models/Meta.swift
@@ -22,10 +22,16 @@ struct UserProfile: Codable, Sendable {
struct SSHKey: Codable, Sendable, Identifiable {
let id: Int
- let fingerprint: String
let comment: String?
let created: Date
let lastUsed: Date?
+
+ var displayLabel: String {
+ if let comment, !comment.isEmpty {
+ return comment
+ }
+ return "SSH key #\(id)"
+ }
}
struct SSHKeyPage: Codable, Sendable {