mirror of
https://github.com/twofas/2fas-ios.git
synced 2024-11-22 02:10:19 +01:00
v5.3.5 Disabling password verification for files import
This commit is contained in:
parent
e45c17afdf
commit
b73f9870fd
@ -28,6 +28,7 @@ final class PasswordTextField: LimitedTextField {
|
||||
var isActive: Callback?
|
||||
var textDidChange: TextDidChange?
|
||||
var didResign: Callback?
|
||||
var verifyPassword = true
|
||||
|
||||
override func textField(
|
||||
_ textField: UITextField,
|
||||
@ -43,13 +44,13 @@ final class PasswordTextField: LimitedTextField {
|
||||
|
||||
let matches = string.matches(ExportFileRules.regExp) || string.isBackspace
|
||||
|
||||
if !matches {
|
||||
if !matches && verifyPassword {
|
||||
notAllowedCharacter?()
|
||||
} else {
|
||||
textDidChange?(newString as String)
|
||||
}
|
||||
|
||||
return matches
|
||||
return matches || !verifyPassword
|
||||
}
|
||||
|
||||
override func resignFirstResponder() -> Bool {
|
||||
|
@ -51,6 +51,16 @@ final class RevealPasswordInput: UIView {
|
||||
input.text ?? ""
|
||||
}
|
||||
|
||||
var verifyPassword: Bool {
|
||||
get {
|
||||
input.verifyPassword
|
||||
}
|
||||
|
||||
set {
|
||||
input.verifyPassword = newValue
|
||||
}
|
||||
}
|
||||
|
||||
private let lineHeight: CGFloat = 25
|
||||
|
||||
private let titleLabel = TitleLabel()
|
||||
|
@ -106,6 +106,7 @@ final class ImporterEnterPasswordViewController: UIViewController {
|
||||
|
||||
private func configureInput() {
|
||||
input.order = .first
|
||||
input.verifyPassword = false
|
||||
|
||||
input.completeAction = { [weak self] in self?.done() }
|
||||
input.didResign = { [weak self] in self?.done() }
|
||||
|
Loading…
Reference in New Issue
Block a user