feat(apps): refine login consent and calendar day/month UX

This commit is contained in:
qzl
2026-03-20 19:00:24 +08:00
parent 2e94908eaa
commit fcf98b1142
11 changed files with 359 additions and 58 deletions
@@ -54,6 +54,12 @@ class _LoginViewState extends State<LoginView> {
}
Future<void> _handleLogin() async {
if (!_agreedToTerms) {
final confirmed = await _showAgreementDialog();
if (!confirmed || !mounted) return;
setState(() => _agreedToTerms = true);
}
final cubit = context.read<LoginCubit>();
cubit.phoneChanged(_phoneController.text);
cubit.codeChanged(_codeController.text);
@@ -70,12 +76,6 @@ class _LoginViewState extends State<LoginView> {
}
Future<void> _handleSendCode() async {
if (!_agreedToTerms) {
final confirmed = await _showAgreementDialog();
if (!confirmed || !mounted) return;
setState(() => _agreedToTerms = true);
}
final cubit = context.read<LoginCubit>();
cubit.phoneChanged(_phoneController.text);
final sent = await cubit.sendCode();