Improve the password length slider

- the slider appears after clicking "generate"
- the slider goes away after clicking a non-password-related section
- generate new password if the slider value changes
This commit is contained in:
Yishi Lin 2017-03-23 01:28:46 +08:00
parent e4e20b1d6f
commit 5a02cb726e
6 changed files with 75 additions and 25 deletions

View file

@ -12,8 +12,7 @@ class EditPasswordTableViewController: PasswordEditorTableViewController {
override func viewDidLoad() {
tableData = [
[[.type: PasswordEditorCellType.textFieldCell, .title: "name", .content: password!.name]],
[[.type: PasswordEditorCellType.fillPasswordCell, .title: "password", .content: password!.password],
[.type: PasswordEditorCellType.passwordLengthCell, .title: "passwordlength"]],
[[.type: PasswordEditorCellType.fillPasswordCell, .title: "password", .content: password!.password]],
[[.type: PasswordEditorCellType.textViewCell, .title: "additions", .content: password!.getAdditionsPlainText()]],
[[.type: PasswordEditorCellType.deletePasswordCell]],
]