Mask encryption passphrase input

This commit is contained in:
Davide De Rosa 2019-03-26 11:23:49 +01:00
parent 08f088a5be
commit baff0435e8
1 changed files with 3 additions and 1 deletions

View File

@ -45,7 +45,9 @@ extension ConfigurationParser.ParsingResult {
switch e {
case .encryptionPassphrase, .unableToDecrypt(_):
let alert = Macros.alert(url.normalizedFilename, L10n.ParsedFile.Alerts.EncryptionPassphrase.message)
alert.addTextField(configurationHandler: nil)
alert.addTextField { (field) in
field.isSecureTextEntry = true
}
alert.addDefaultAction(L10n.Global.ok) {
guard let passphrase = alert.textFields?.first?.text else {
return