diff --git a/pass/Base.lproj/Main.storyboard b/pass/Base.lproj/Main.storyboard
index 19da3a5..a969437 100644
--- a/pass/Base.lproj/Main.storyboard
+++ b/pass/Base.lproj/Main.storyboard
@@ -1689,7 +1689,7 @@ Secret Question 1: What is your childhood best friend's most bizarre superhero f
-
+
@@ -1775,8 +1775,8 @@ Secret Question 1: What is your childhood best friend's most bizarre superhero f
-
-
+
+
diff --git a/pass/Controllers/SSHKeySettingTableViewController.swift b/pass/Controllers/SSHKeySettingTableViewController.swift
index 2e542bb..c344d9f 100644
--- a/pass/Controllers/SSHKeySettingTableViewController.swift
+++ b/pass/Controllers/SSHKeySettingTableViewController.swift
@@ -17,20 +17,20 @@ class SSHKeySettingTableViewController: AutoCellHeightUITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
- privateKeyURLTextField.text = SharedDefaults[.gitSSHPrivateKeyURL]?.absoluteString
}
-
@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)
return
}
- SharedDefaults[.gitSSHPrivateKeyURL] = privateKeyURL
-
do {
- try Data(contentsOf: privateKeyURL).write(to: URL(fileURLWithPath: Globals.gitSSHPrivateKeyPath), options: .atomic)
+ try Data(contentsOf: privateKeyURL).write(to: URL(fileURLWithPath: SshKey.PRIVATE.getFileSharingPath()), options: .atomic)
+ try self.passwordStore.gitSSHKeyImportFromFileSharing()
+ SharedDefaults[.gitSSHKeySource] = "file"
+ SVProgressHUD.showSuccess(withStatus: "Imported".localize())
+ SVProgressHUD.dismiss(withDelay: 1)
} catch {
Utils.alert(title: "Error".localize(), message: error.localizedDescription, controller: self, completion: nil)
}