Add networking layer and wire up v9 login flow with unit tests.
Introduce APIClient/AuthAPI, complete login with multi-account selection, and polish the login card UI with shadow and keyboard dismiss. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -18,6 +18,7 @@ final class LoginTextField: UIView {
|
||||
|
||||
var onTextChange: ((String) -> Void)?
|
||||
var onReturnKey: (() -> Void)?
|
||||
var onEditingDidEnd: (() -> Void)?
|
||||
|
||||
init(placeholder: String) {
|
||||
super.init(frame: .zero)
|
||||
@ -55,6 +56,7 @@ final class LoginTextField: UIView {
|
||||
textField.attributedPlaceholder = NSAttributedString(string: placeholder, attributes: attributes)
|
||||
|
||||
textField.addTarget(self, action: #selector(textDidChange), for: .editingChanged)
|
||||
textField.addTarget(self, action: #selector(editingDidEnd), for: .editingDidEnd)
|
||||
addSubview(textField)
|
||||
}
|
||||
|
||||
@ -72,6 +74,10 @@ final class LoginTextField: UIView {
|
||||
@objc private func textDidChange() {
|
||||
onTextChange?(text)
|
||||
}
|
||||
|
||||
@objc private func editingDidEnd() {
|
||||
onEditingDidEnd?()
|
||||
}
|
||||
}
|
||||
|
||||
extension LoginTextField: UITextFieldDelegate {
|
||||
|
||||
Reference in New Issue
Block a user