add about repository view

This commit is contained in:
Bob Sun 2017-02-09 22:13:31 +08:00
parent fc3701abfc
commit 07cd49449e
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
4 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,26 @@
//
// AboutRepositoryTableViewController.swift
// pass
//
// Created by Mingshen Sun on 9/2/2017.
// Copyright © 2017 Bob Sun. All rights reserved.
//
import UIKit
class AboutRepositoryTableViewController: BasicStaticTableViewController {
override func viewDidLoad() {
navigationItemTitle = "About Repository"
super.viewDidLoad()
let passwordEntities = PasswordStore.shared.fetchPasswordEntityCoreData()
tableData = [
// section 0
[[.type: CellDataType.detail, .title: "Passwords", .detailText: String(passwordEntities.count)],
[.type: CellDataType.detail, .title: "Last Updated", .detailText: Utils.getLastUpdatedTimeString()],
],
]
tableView.reloadData()
}
}

View file

@ -12,6 +12,10 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
override func viewDidLoad() {
navigationItemTitle = "General"
tableData = [
// section 0
[[.type: CellDataType.segue, .title: "About Repository", .link: "showAboutRepositorySegue"],],
]
super.viewDidLoad()
}
}