feat: 添加视觉设计语言系统并重构认证页面UI
- 新增 visual_design_language.md 设计规范文档 - 新增 auth 设计 tokens (authBackground, authCard, authInput, feedback 系列等) - 重构登录/注册/验证码/重置密码页面为新设计系统 - 新增 AuthHeroHeader, AuthSurfaceCard, AuthSection, AuthField, PasswordField 组件 - 重构 AppBanner 和 Toast 支持多类型配置 (info/success/warning/error) - 后端 AgentScope: 重整 schemas/prompts/tools 作用域, 新增协议文档 - 更新 AGENTS.md 集成视觉设计语言约束
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import '../../features/auth/presentation/bloc/auth_state.dart';
|
||||
import '../../features/calendar/data/services/calendar_service.dart';
|
||||
import '../notifications/local_notification_service.dart';
|
||||
|
||||
class AuthSessionBootstrapper {
|
||||
AuthSessionBootstrapper({
|
||||
required CalendarService calendarService,
|
||||
required LocalNotificationService notificationService,
|
||||
}) : _calendarService = calendarService,
|
||||
_notificationService = notificationService;
|
||||
|
||||
final CalendarService _calendarService;
|
||||
final LocalNotificationService _notificationService;
|
||||
|
||||
String? _syncedUserId;
|
||||
|
||||
Future<void> syncForAuthState(AuthState state) async {
|
||||
if (state is! AuthAuthenticated) {
|
||||
_syncedUserId = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_syncedUserId == state.user.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
_syncedUserId = state.user.id;
|
||||
|
||||
try {
|
||||
final now = DateTime.now();
|
||||
final end = now.add(const Duration(days: 90));
|
||||
final events = await _calendarService.getEventsForRange(now, end);
|
||||
await _notificationService.rebuildUpcomingReminders(events);
|
||||
} catch (_) {
|
||||
// ignore reminder bootstrap failures
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,8 @@ class AppColors {
|
||||
static const blue600 = Color(0xFF2563EB);
|
||||
static const blue500 = Color(0xFF3B82F6);
|
||||
static const blue400 = Color(0xFF60A5FA);
|
||||
static const blue300 = Color(0xFF93C5FD);
|
||||
static const blue200 = Color(0xFFBFDBFE);
|
||||
static const blue100 = Color(0xFFDBEAFE);
|
||||
static const blue50 = Color(0xFFEFF6FF);
|
||||
|
||||
@@ -81,6 +83,48 @@ class AppColors {
|
||||
static const appIconBorder = Color(0xFFC7DDFB);
|
||||
static const appTitle = Color(0xFF1E293B);
|
||||
|
||||
static const authBackgroundTop = Color(0xFFF4F8FF);
|
||||
static const authBackgroundBottom = Color(0xFFF8FAFC);
|
||||
static const authBackgroundOrb = Color(0xFFDCEBFF);
|
||||
static const authCardBackground = Color(0xFFFCFDFE);
|
||||
static const authCardBorder = Color(0xFFE5ECF6);
|
||||
static const authCardHighlight = Color(0xFFFFFFFF);
|
||||
static const authSectionBackground = Color(0xFFF7FAFE);
|
||||
static const authSectionBorder = Color(0xFFE4EBF5);
|
||||
static const authInputBackground = Color(0xFFF6F9FD);
|
||||
static const authInputBorder = Color(0xFFD9E4F1);
|
||||
static const authInputFocus = Color(0xFF8EB8F3);
|
||||
static const authInputIcon = Color(0xFF8A9BB2);
|
||||
static const authPrimaryButton = Color(0xFF2F6FD6);
|
||||
static const authPrimaryButtonPressed = Color(0xFF245FC0);
|
||||
static const authPrimaryButtonDisabled = Color(0xFFD9E3F2);
|
||||
static const authPrimaryButtonText = Color(0xFFF8FBFF);
|
||||
static const authSecondaryButtonBackground = Color(0xFFF4F8FF);
|
||||
static const authSecondaryButtonBorder = Color(0xFFD8E4F6);
|
||||
static const authSecondaryButtonText = Color(0xFF315D9C);
|
||||
static const authLinkText = Color(0xFF356CC8);
|
||||
static const authLinkMuted = Color(0xFF70839E);
|
||||
|
||||
static const feedbackInfoSurface = Color(0xFFF3F8FF);
|
||||
static const feedbackInfoBorder = Color(0xFFD6E5FB);
|
||||
static const feedbackInfoIcon = Color(0xFF2D6CDF);
|
||||
static const feedbackInfoText = Color(0xFF26476F);
|
||||
|
||||
static const feedbackSuccessSurface = Color(0xFFF1FBF6);
|
||||
static const feedbackSuccessBorder = Color(0xFFCDECD9);
|
||||
static const feedbackSuccessIcon = Color(0xFF129268);
|
||||
static const feedbackSuccessText = Color(0xFF1E5A46);
|
||||
|
||||
static const feedbackWarningSurface = Color(0xFFFFF8ED);
|
||||
static const feedbackWarningBorder = Color(0xFFF4DFC0);
|
||||
static const feedbackWarningIcon = Color(0xFFD68A18);
|
||||
static const feedbackWarningText = Color(0xFF7A5821);
|
||||
|
||||
static const feedbackErrorSurface = Color(0xFFFFF4F3);
|
||||
static const feedbackErrorBorder = Color(0xFFF1D2D0);
|
||||
static const feedbackErrorIcon = Color(0xFFD14F4B);
|
||||
static const feedbackErrorText = Color(0xFF7E3735);
|
||||
|
||||
static const todoBg = Color(0xFFF8FAFC);
|
||||
static const todoCardBg = Color(0xFFFFFFFF);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user