Show folder name in nagivation bar

This commit is contained in:
Mingshen Sun 2019-09-29 15:59:11 -07:00
parent 9330cbc1e0
commit fcec7d1245
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
3 changed files with 11 additions and 0 deletions

View file

@ -245,6 +245,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
tableView.contentInset = UIEdgeInsets.init(top: 44, left: 0, bottom: 0, right: 0) tableView.contentInset = UIEdgeInsets.init(top: 44, left: 0, bottom: 0, right: 0)
view.addSubview(searchBarView!) view.addSubview(searchBarView!)
} }
navigationItem.title = "PasswordStore".localize()
tableView.refreshControl = syncControl tableView.refreshControl = syncControl
SVProgressHUD.setDefaultMaskType(.black) SVProgressHUD.setDefaultMaskType(.black)
tableView.register(UINib(nibName: "PasswordWithFolderTableViewCell", bundle: nil), forCellReuseIdentifier: "passwordWithFolderTableViewCell") tableView.register(UINib(nibName: "PasswordWithFolderTableViewCell", bundle: nil), forCellReuseIdentifier: "passwordWithFolderTableViewCell")
@ -549,8 +550,16 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
} }
if parentPasswordEntity != nil { if parentPasswordEntity != nil {
navigationItem.leftBarButtonItem = backUIBarButtonItem navigationItem.leftBarButtonItem = backUIBarButtonItem
navigationItem.title = parentPasswordEntity?.getName()
if #available(iOS 11, *) {
navigationController?.navigationBar.prefersLargeTitles = false
}
} else { } else {
navigationItem.leftBarButtonItem = nil navigationItem.leftBarButtonItem = nil
navigationItem.title = "PasswordStore".localize()
if #available(iOS 11, *) {
navigationController?.navigationBar.prefersLargeTitles = true
}
} }
navigationItem.rightBarButtonItem = addPasswordUIBarButtonItem navigationItem.rightBarButtonItem = addPasswordUIBarButtonItem

View file

@ -8,6 +8,7 @@
// General // General
"PassForIos" = "Pass for iOS"; "PassForIos" = "Pass for iOS";
"PasswordStore" = "Password Store";
"Passphrase" = "Passwort"; "Passphrase" = "Passwort";
"Password" = "Passwort"; "Password" = "Passwort";
"Passwords" = "Passwörter"; "Passwords" = "Passwörter";

View file

@ -8,6 +8,7 @@
// General // General
"PassForIos" = "Pass for iOS"; "PassForIos" = "Pass for iOS";
"PasswordStore" = "Password Store";
"Passphrase" = "Passphrase"; "Passphrase" = "Passphrase";
"Password" = "Password"; "Password" = "Password";
"Passwords" = "Passwords"; "Passwords" = "Passwords";