change password of git repository

This commit is contained in:
Bob Sun 2017-02-07 15:09:35 +08:00
parent 52ae145f78
commit 16df7ac847
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
2 changed files with 17 additions and 19 deletions

View file

@ -25,8 +25,6 @@ class SettingsTableViewController: UITableViewController {
let password = controller.passwordTextField.text!
let auth = controller.authenticationMethod
if Defaults[.gitRepositoryURL] == nil || gitRepostiroyURL != Defaults[.gitRepositoryURL]!.absoluteString {
SVProgressHUD.setDefaultMaskType(.black)
SVProgressHUD.show(withStatus: "Prepare Repository")
@ -55,11 +53,6 @@ class SettingsTableViewController: UITableViewController {
DispatchQueue.main.async {
SVProgressHUD.showSuccess(withStatus: "Done")
SVProgressHUD.dismiss(withDelay: 1)
Defaults[.gitRepositoryURL] = URL(string: gitRepostiroyURL)
Defaults[.gitRepositoryUsername] = username
Defaults[.gitRepositoryPassword] = password
Defaults[.gitRepositoryAuthenticationMethod] = auth
Defaults[.lastUpdatedTime] = Date()
@ -76,6 +69,11 @@ class SettingsTableViewController: UITableViewController {
}
}
Defaults[.gitRepositoryURL] = URL(string: gitRepostiroyURL)
Defaults[.gitRepositoryUsername] = username
Defaults[.gitRepositoryPassword] = password
Defaults[.gitRepositoryAuthenticationMethod] = auth
} else if let controller = segue.source as? PGPKeySettingTableViewController {
if Defaults[.pgpKeyURL] != URL(string: controller.pgpKeyURLTextField.text!) ||