Fix #324: Do not copy password automatically when adding/editing it
This commit is contained in:
parent
e3d9d4c45c
commit
e418d216b9
2 changed files with 1 additions and 5 deletions
|
|
@ -204,7 +204,6 @@ class PasswordEditorTableViewController: UITableViewController, FillPasswordTabl
|
||||||
|
|
||||||
let length = passwordLengthCell?.roundedValue ?? 0
|
let length = passwordLengthCell?.roundedValue ?? 0
|
||||||
let plainPassword = PasswordGeneratorFlavour.from(SharedDefaults[.passwordGeneratorFlavor]).generatePassword(length: length)
|
let plainPassword = PasswordGeneratorFlavour.from(SharedDefaults[.passwordGeneratorFlavor]).generatePassword(length: length)
|
||||||
SecurePasteboard.shared.copy(textToCopy: plainPassword)
|
|
||||||
|
|
||||||
// update tableData so to make sure reloadData() works correctly
|
// update tableData so to make sure reloadData() works correctly
|
||||||
tableData[passwordSection][0][PasswordEditorCellKey.content] = plainPassword
|
tableData[passwordSection][0][PasswordEditorCellKey.content] = plainPassword
|
||||||
|
|
@ -274,7 +273,6 @@ class PasswordEditorTableViewController: UITableViewController, FillPasswordTabl
|
||||||
} else if textField == fillPasswordCell?.contentTextField {
|
} else if textField == fillPasswordCell?.contentTextField {
|
||||||
if let plainPassword = fillPasswordCell?.getContent() {
|
if let plainPassword = fillPasswordCell?.getContent() {
|
||||||
tableData[passwordSection][0][PasswordEditorCellKey.content] = plainPassword
|
tableData[passwordSection][0][PasswordEditorCellKey.content] = plainPassword
|
||||||
SecurePasteboard.shared.copy(textToCopy: plainPassword)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -347,8 +345,6 @@ class PasswordEditorTableViewController: UITableViewController, FillPasswordTabl
|
||||||
self.tableData[self.passwordSection][0][PasswordEditorCellKey.content] = generatedPassword
|
self.tableData[self.passwordSection][0][PasswordEditorCellKey.content] = generatedPassword
|
||||||
// update cell manually, no need to call reloadData()
|
// update cell manually, no need to call reloadData()
|
||||||
self.fillPasswordCell?.setContent(content: generatedPassword)
|
self.fillPasswordCell?.setContent(content: generatedPassword)
|
||||||
// make sure the clipboard gets cleared in 45s
|
|
||||||
SecurePasteboard.shared.copy(textToCopy: generatedPassword)
|
|
||||||
}))
|
}))
|
||||||
alert.addAction(UIAlertAction(title: "Cancel".localize(), style: UIAlertAction.Style.cancel, handler:nil))
|
alert.addAction(UIAlertAction(title: "Cancel".localize(), style: UIAlertAction.Style.cancel, handler:nil))
|
||||||
self.present(alert, animated: true, completion: nil)
|
self.present(alert, animated: true, completion: nil)
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@
|
||||||
"RemovePrefix." = "Bitte entferne den Prefix \"/\" vom Namen des Passwortes.";
|
"RemovePrefix." = "Bitte entferne den Prefix \"/\" vom Namen des Passwortes.";
|
||||||
"PasswordNameInvalid." = "Der Name des Passwortes ist ungültig.";
|
"PasswordNameInvalid." = "Der Name des Passwortes ist ungültig.";
|
||||||
"CannotParseFilename." = "Der Name der Datei kann nicht gelesen werden. Bitte vereinfache den Namen des Passwortes.";
|
"CannotParseFilename." = "Der Name der Datei kann nicht gelesen werden. Bitte vereinfache den Namen des Passwortes.";
|
||||||
"WannaUseIt?" = "Möchtest du es benutzen?";
|
"WannaUseIt?" = "Möchtest du es als Passwort verwenden?";
|
||||||
"SeemsLikeYouHaveCopiedSomething." = "Scheint so, als hast du etwas kopiert.";
|
"SeemsLikeYouHaveCopiedSomething." = "Scheint so, als hast du etwas kopiert.";
|
||||||
"FirstStringIs:" = "Die erste Zeichenkette ist:";
|
"FirstStringIs:" = "Die erste Zeichenkette ist:";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue