Support folder operations
Example: - add: a/b/c/d - delete: a/b/c/d - move: a/b/c/d -> a/b/c/d/e
This commit is contained in:
parent
b1ef8a343f
commit
d8ecd1e889
8 changed files with 213 additions and 141 deletions
|
|
@ -42,14 +42,6 @@ class AddPasswordTableViewController: PasswordEditorTableViewController {
|
|||
Utils.alert(title: alertTitle, message: alertMessage, controller: self, completion: nil)
|
||||
return false
|
||||
}
|
||||
|
||||
// check "/"
|
||||
guard nameCell.getContent()!.contains("/") == false else {
|
||||
let alertTitle = "Cannot Add Password"
|
||||
let alertMessage = "Illegal character."
|
||||
Utils.alert(title: alertTitle, message: alertMessage, controller: self, completion: nil)
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
@ -73,7 +65,9 @@ class AddPasswordTableViewController: PasswordEditorTableViewController {
|
|||
} else {
|
||||
plainText = "\(cellContents["password"]!)"
|
||||
}
|
||||
password = Password(name: cellContents["name"]!, plainText: plainText)
|
||||
let name = URL(string: cellContents["name"]!)!.lastPathComponent
|
||||
let url = URL(string: cellContents["name"]!)!.appendingPathExtension("gpg")
|
||||
password = Password(name: name, url: url, plainText: plainText)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue