Fix some UI issues introduced by refactoring
This commit is contained in:
parent
efdc45ea89
commit
cea1332b0d
6 changed files with 9 additions and 5 deletions
|
|
@ -66,6 +66,7 @@ class GitSSHKeyArmorSettingTableViewController: AutoCellHeightUITableViewControl
|
|||
Utils.alert(title: "CannotSave".localize(), message: "CannotSaveSshKey".localize(), controller: self, completion: nil)
|
||||
}
|
||||
SharedDefaults[.gitSSHKeySource] = .armor
|
||||
SharedDefaults[.gitAuthenticationMethod] = .key
|
||||
self.navigationController!.popViewController(animated: true)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ class GitServerSettingTableViewController: UITableViewController {
|
|||
usernameTextField.text = self.gitUsername
|
||||
branchNameTextField.text = self.gitBranchName
|
||||
sshLabel = authSSHKeyCell.subviews[0].subviews[0] as? UILabel
|
||||
updateAuthenticationMethodCheckView(for: .password)
|
||||
authSSHKeyCell.accessoryType = .detailButton
|
||||
}
|
||||
|
||||
|
|
@ -73,6 +72,7 @@ class GitServerSettingTableViewController: UITableViewController {
|
|||
super.viewWillAppear(animated)
|
||||
// Grey out ssh option if ssh_key is not present.
|
||||
sshLabel?.isEnabled = AppKeychain.shared.contains(key: SshKey.PRIVATE.getKeychainKey())
|
||||
updateAuthenticationMethodCheckView(for: gitAuthenticationMethod)
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
|
|
@ -248,6 +248,8 @@ class GitServerSettingTableViewController: UITableViewController {
|
|||
SVProgressHUD.showSuccess(withStatus: "Imported".localize())
|
||||
SVProgressHUD.dismiss(withDelay: 1)
|
||||
self.sshLabel?.isEnabled = true
|
||||
self.gitAuthenticationMethod = .key
|
||||
self.updateAuthenticationMethodCheckView(for: self.gitAuthenticationMethod)
|
||||
} catch {
|
||||
Utils.alert(title: "Error".localize(), message: error.localizedDescription, controller: self)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class SSHKeySettingTableViewController: AutoCellHeightUITableViewController {
|
|||
try Data(contentsOf: privateKeyURL).write(to: URL(fileURLWithPath: SshKey.PRIVATE.getFileSharingPath()), options: .atomic)
|
||||
try self.passwordStore.gitSSHKeyImportFromFileSharing()
|
||||
SharedDefaults[.gitSSHKeySource] = .file
|
||||
SharedDefaults[.gitAuthenticationMethod] = .key
|
||||
SVProgressHUD.showSuccess(withStatus: "Imported".localize())
|
||||
SVProgressHUD.dismiss(withDelay: 1)
|
||||
} catch {
|
||||
|
|
|
|||
|
|
@ -117,13 +117,13 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
|
|||
NotificationCenter.default.addObserver(self, selector: #selector(SettingsTableViewController.actOnPasswordStoreErasedNotification), name: .passwordStoreErased, object: nil)
|
||||
self.passwordRepositoryTableViewCell.detailTextLabel?.text = SharedDefaults[.gitURL].host
|
||||
setPGPKeyTableViewCellDetailText()
|
||||
setPasswordRepositoryTableViewCellDetailText()
|
||||
setPasscodeLockCell()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(true)
|
||||
tabBarController!.delegate = self
|
||||
setPasswordRepositoryTableViewCellDetailText()
|
||||
}
|
||||
|
||||
private func setPasscodeLockCell() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue