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:
2026-07-06 15:33:34 +08:00
parent b7d74905b7
commit 699f1ba7c4
21 changed files with 2387 additions and 18 deletions

View File

@ -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 {