Add confirmation prompt for removing keys (fix #491)
This commit is contained in:
parent
7320319031
commit
ff6a1edf62
7 changed files with 42 additions and 9 deletions
|
|
@ -314,10 +314,13 @@ class GitRepositorySettingsTableViewController: UITableViewController, PasswordA
|
|||
if Defaults.gitSSHKeySource != nil {
|
||||
optionMenu.addAction(
|
||||
UIAlertAction(title: "RemoveSShKeys".localize(), style: .destructive) { _ in
|
||||
self.passwordStore.removeGitSSHKeys()
|
||||
Defaults.gitSSHKeySource = nil
|
||||
self.sshLabel?.isEnabled = false
|
||||
self.gitAuthenticationMethod = .password
|
||||
let alert = UIAlertController.removeConfirmationAlert(title: "RemoveSShKeys".localize(), message: "") { _ in
|
||||
self.passwordStore.removeGitSSHKeys()
|
||||
Defaults.gitSSHKeySource = nil
|
||||
self.sshLabel?.isEnabled = false
|
||||
self.gitAuthenticationMethod = .password
|
||||
}
|
||||
self.present(alert, animated: true, completion: nil)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue