refactor: 移除前端 Mock API,新增共享组件,优化认证流程

- 删除 mock_api_client、mock_calendar_service、mock_history_service
- 新增 fixed_length_code_input、link_button、message_composer 共享组件
- 优化登录/注册/密码重置页面使用新组件
- 简化 injection.dart 移除 mock 分支
- 更新 env.dart 配置(BACKEND_URL 替换 API_URL)
- 后端 agentscope 工具和测试更新
- 重构 AGENTS.md 文档结构
- 新增 deploy/ 目录和 protocol 文档
This commit is contained in:
qzl
2026-03-12 16:41:45 +08:00
parent d7fbb74bf8
commit 01c36eb32e
70 changed files with 5138 additions and 5829 deletions
+43
View File
@@ -0,0 +1,43 @@
import 'package:flutter/material.dart';
import '../../core/theme/design_tokens.dart';
class LinkButton extends StatelessWidget {
const LinkButton({
super.key,
required this.text,
required this.onTap,
this.enabled = true,
this.textAlign = TextAlign.center,
});
final String text;
final VoidCallback? onTap;
final bool enabled;
final TextAlign textAlign;
@override
Widget build(BuildContext context) {
return SizedBox(
height: 44,
child: TextButton(
onPressed: enabled ? onTap : null,
style: TextButton.styleFrom(
foregroundColor: enabled ? AppColors.slate500 : AppColors.slate300,
padding: const EdgeInsets.symmetric(
horizontal: AppSpacing.md,
vertical: AppSpacing.sm,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppRadius.sm),
),
),
child: Text(
text,
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
textAlign: textAlign,
),
),
);
}
}