From dd48d1d59d0e25c7deb167f048e6fafad75a697f Mon Sep 17 00:00:00 2001 From: ZL-Q Date: Tue, 28 Apr 2026 17:23:03 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E3=80=81=E5=8F=8D=E9=A6=88=E9=A1=B5=E9=9D=A2=E5=92=8C=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 App 主题配置 - 优化反馈页面 - 更新认证和通知测试用例 --- apps/lib/app/app_theme.dart | 2 ++ .../presentation/screens/feedback_screen.dart | 19 +++++++++++-------- apps/test/features/auth/auth_bloc_test.dart | 2 ++ .../notifications/notification_bloc_test.dart | 6 +++++- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/apps/lib/app/app_theme.dart b/apps/lib/app/app_theme.dart index f6d0088..22d422f 100644 --- a/apps/lib/app/app_theme.dart +++ b/apps/lib/app/app_theme.dart @@ -69,6 +69,8 @@ class AppTheme { warning: Color(0xFFF57C00), warningContainer: Color(0xFFFFF3E0), onWarningContainer: Color(0xFF8A4B00), + incomeGreenBg: Color(0xFFE8F5E9), + incomeGreenText: Color(0xFF2E7D32), ), ], ); diff --git a/apps/lib/features/settings/presentation/screens/feedback_screen.dart b/apps/lib/features/settings/presentation/screens/feedback_screen.dart index 60eeb50..8e4a572 100644 --- a/apps/lib/features/settings/presentation/screens/feedback_screen.dart +++ b/apps/lib/features/settings/presentation/screens/feedback_screen.dart @@ -50,15 +50,17 @@ class _FeedbackScreenState extends State { final colors = Theme.of(context).colorScheme; final l10n = AppLocalizations.of(context)!; - return Scaffold( - backgroundColor: colors.surfaceContainerLow, - appBar: AppBar( - title: Text(l10n.feedbackTitle), - centerTitle: true, + return GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Scaffold( backgroundColor: colors.surfaceContainerLow, - surfaceTintColor: colors.surfaceContainerLow, - ), - body: ListView( + appBar: AppBar( + title: Text(l10n.feedbackTitle), + centerTitle: true, + backgroundColor: colors.surfaceContainerLow, + surfaceTintColor: colors.surfaceContainerLow, + ), + body: ListView( padding: const EdgeInsets.fromLTRB( AppSpacing.lg, AppSpacing.md, @@ -154,6 +156,7 @@ class _FeedbackScreenState extends State { ), ), ], + ), ), ); } diff --git a/apps/test/features/auth/auth_bloc_test.dart b/apps/test/features/auth/auth_bloc_test.dart index 4e4d1f9..76ae34d 100644 --- a/apps/test/features/auth/auth_bloc_test.dart +++ b/apps/test/features/auth/auth_bloc_test.dart @@ -21,6 +21,8 @@ class _FakeAuthRepository implements AuthRepository { Future loginWithEmailOtp({ required String email, required String otp, + String? language, + String? timezone, }) async { return AuthUser(id: 'u1', email: email); } diff --git a/apps/test/features/notifications/notification_bloc_test.dart b/apps/test/features/notifications/notification_bloc_test.dart index 5a00728..072a0e3 100644 --- a/apps/test/features/notifications/notification_bloc_test.dart +++ b/apps/test/features/notifications/notification_bloc_test.dart @@ -17,6 +17,7 @@ class _FakeNotificationRepository implements NotificationRepository { Future listNotifications({ int limit = 20, String? cursor, + String locale = 'zh', }) async { return NotificationListResult( items: items, @@ -29,7 +30,10 @@ class _FakeNotificationRepository implements NotificationRepository { Future getUnreadCount() async => unreadCount; @override - Future markRead({required String notificationId}) async { + Future markRead({ + required String notificationId, + String locale = 'zh', + }) async { if (failMarkRead) { throw Exception('Mark read failed'); }