Rewrite PasswordViewController

This commit is contained in:
Mingshen Sun 2021-01-17 19:49:05 -08:00
parent 372e897350
commit 68077bf04c
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
10 changed files with 676 additions and 729 deletions

View file

@ -97,6 +97,16 @@ public class PasswordStore {
Defaults.lastSyncedTime
}
public var lastSyncedTimeString: String {
guard let date = lastSyncedTime else {
return "SyncAgain?".localize()
}
let formatter = DateFormatter()
formatter.dateStyle = .medium
formatter.timeStyle = .short
return formatter.string(from: date)
}
public var numberOfCommits: UInt? {
storeRepository?.numberOfCommits(inCurrentBranch: nil)
}