Some cosmetic changes
This commit is contained in:
parent
e447b1d9d3
commit
5f6723246b
7 changed files with 10 additions and 20 deletions
|
|
@ -60,11 +60,7 @@ class GitSSHKeyArmorSettingTableViewController: AutoCellHeightUITableViewControl
|
|||
}
|
||||
|
||||
@IBAction func doneButtonTapped(_ sender: Any) {
|
||||
do {
|
||||
try passwordStore.initGitSSHKey(with: armorPrivateKeyTextView.text)
|
||||
} catch {
|
||||
Utils.alert(title: "CannotSave".localize(), message: "CannotSaveSshKey".localize(), controller: self, completion: nil)
|
||||
}
|
||||
AppKeychain.shared.add(string: armorPrivateKeyTextView.text, for: SshKey.PRIVATE.getKeychainKey())
|
||||
Defaults.gitSSHKeySource = .armor
|
||||
Defaults.gitAuthenticationMethod = .key
|
||||
self.navigationController!.popViewController(animated: true)
|
||||
|
|
|
|||
|
|
@ -13,12 +13,9 @@ import passKit
|
|||
class SSHKeySettingTableViewController: AutoCellHeightUITableViewController {
|
||||
|
||||
@IBOutlet weak var privateKeyURLTextField: UITextField!
|
||||
|
||||
let passwordStore = PasswordStore.shared
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
}
|
||||
|
||||
@IBAction func doneButtonTapped(_ sender: UIButton) {
|
||||
guard let privateKeyURL = URL(string: privateKeyURLTextField.text!.trimmed) else {
|
||||
Utils.alert(title: "CannotSave".localize(), message: "SetPrivateKeyUrl.".localize(), controller: self, completion: nil)
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
|
|||
self.keychain.removeContent(for: PgpKey.PRIVATE.getKeychainKey())
|
||||
PGPAgent.shared.uninitKeys()
|
||||
self.pgpKeyTableViewCell.detailTextLabel?.text = "NotSet".localize()
|
||||
Defaults.pgpKeySource = nil
|
||||
}
|
||||
optionMenu.addAction(deleteAction)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue