Show folder path in the "add password" view
This commit is contained in:
parent
ced3142291
commit
49180d74e6
2 changed files with 10 additions and 1 deletions
|
|
@ -10,8 +10,8 @@ import UIKit
|
||||||
import passKit
|
import passKit
|
||||||
|
|
||||||
class AddPasswordTableViewController: PasswordEditorTableViewController {
|
class AddPasswordTableViewController: PasswordEditorTableViewController {
|
||||||
var tempContent: String = ""
|
|
||||||
let passwordStore = PasswordStore.shared
|
let passwordStore = PasswordStore.shared
|
||||||
|
var defaultDirPrefix = ""
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
tableData = [
|
tableData = [
|
||||||
|
|
@ -24,6 +24,7 @@ class AddPasswordTableViewController: PasswordEditorTableViewController {
|
||||||
lengthSetting.max > lengthSetting.min {
|
lengthSetting.max > lengthSetting.min {
|
||||||
tableData[1].append([.type: PasswordEditorCellType.passwordLengthCell, .title: "passwordlength"])
|
tableData[1].append([.type: PasswordEditorCellType.passwordLengthCell, .title: "passwordlength"])
|
||||||
}
|
}
|
||||||
|
tableData[0][0][PasswordEditorCellKey.content] = defaultDirPrefix
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -466,6 +466,14 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
||||||
let passwordEntity = getPasswordEntry(by: selectedIndexPath).passwordEntity!
|
let passwordEntity = getPasswordEntry(by: selectedIndexPath).passwordEntity!
|
||||||
viewController.passwordEntity = passwordEntity
|
viewController.passwordEntity = passwordEntity
|
||||||
}
|
}
|
||||||
|
} else if segue.identifier == "addPasswordSegue" {
|
||||||
|
if let navController = segue.destination as? UINavigationController {
|
||||||
|
if let viewController = navController.topViewController as? AddPasswordTableViewController {
|
||||||
|
if let path = parentPasswordEntity?.path {
|
||||||
|
viewController.defaultDirPrefix = "\(path)/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue