Polish codes related to password generation
1. Polish codes in PasswordGeneratorFlavour 2. Polish related codes in view controllers
This commit is contained in:
parent
ae94388ba4
commit
71c793029a
10 changed files with 108 additions and 127 deletions
|
|
@ -10,22 +10,11 @@ import UIKit
|
|||
import passKit
|
||||
|
||||
class AddPasswordTableViewController: PasswordEditorTableViewController {
|
||||
let passwordStore = PasswordStore.shared
|
||||
var defaultDirPrefix = ""
|
||||
|
||||
override func viewDidLoad() {
|
||||
tableData = [
|
||||
[[.type: PasswordEditorCellType.nameCell, .title: "name"]],
|
||||
[[.type: PasswordEditorCellType.fillPasswordCell, .title: "password"]],
|
||||
[[.type: PasswordEditorCellType.additionsCell, .title: "additions"]],
|
||||
[[.type: PasswordEditorCellType.scanQRCodeCell]]
|
||||
]
|
||||
if PasswordGeneratorFlavour.from(Defaults.passwordGeneratorFlavor) == .RANDOM {
|
||||
tableData[1].append([.type: PasswordEditorCellType.passwordLengthCell, .title: "passwordlength"])
|
||||
}
|
||||
tableData[1].append([.type: PasswordEditorCellType.memorablePasswordGeneratorCell])
|
||||
tableData[0][0][PasswordEditorCellKey.content] = defaultDirPrefix
|
||||
super.viewDidLoad()
|
||||
tableData[0][0][PasswordEditorCellKey.content] = defaultDirPrefix
|
||||
}
|
||||
|
||||
override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool {
|
||||
|
|
@ -39,7 +28,7 @@ class AddPasswordTableViewController: PasswordEditorTableViewController {
|
|||
}
|
||||
|
||||
// check name
|
||||
guard checkName() == true else {
|
||||
guard checkName() else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue