chore: 更新主题、反馈页面和测试用例

- 更新 App 主题配置
- 优化反馈页面
- 更新认证和通知测试用例
This commit is contained in:
ZL-Q
2026-04-28 17:23:03 +08:00
parent 85023a668b
commit dd48d1d59d
4 changed files with 20 additions and 9 deletions
+2
View File
@@ -69,6 +69,8 @@ class AppTheme {
warning: Color(0xFFF57C00), warning: Color(0xFFF57C00),
warningContainer: Color(0xFFFFF3E0), warningContainer: Color(0xFFFFF3E0),
onWarningContainer: Color(0xFF8A4B00), onWarningContainer: Color(0xFF8A4B00),
incomeGreenBg: Color(0xFFE8F5E9),
incomeGreenText: Color(0xFF2E7D32),
), ),
], ],
); );
@@ -50,15 +50,17 @@ class _FeedbackScreenState extends State<FeedbackScreen> {
final colors = Theme.of(context).colorScheme; final colors = Theme.of(context).colorScheme;
final l10n = AppLocalizations.of(context)!; final l10n = AppLocalizations.of(context)!;
return Scaffold( return GestureDetector(
backgroundColor: colors.surfaceContainerLow, onTap: () => FocusScope.of(context).unfocus(),
appBar: AppBar( child: Scaffold(
title: Text(l10n.feedbackTitle),
centerTitle: true,
backgroundColor: colors.surfaceContainerLow, backgroundColor: colors.surfaceContainerLow,
surfaceTintColor: colors.surfaceContainerLow, appBar: AppBar(
), title: Text(l10n.feedbackTitle),
body: ListView( centerTitle: true,
backgroundColor: colors.surfaceContainerLow,
surfaceTintColor: colors.surfaceContainerLow,
),
body: ListView(
padding: const EdgeInsets.fromLTRB( padding: const EdgeInsets.fromLTRB(
AppSpacing.lg, AppSpacing.lg,
AppSpacing.md, AppSpacing.md,
@@ -154,6 +156,7 @@ class _FeedbackScreenState extends State<FeedbackScreen> {
), ),
), ),
], ],
),
), ),
); );
} }
@@ -21,6 +21,8 @@ class _FakeAuthRepository implements AuthRepository {
Future<AuthUser> loginWithEmailOtp({ Future<AuthUser> loginWithEmailOtp({
required String email, required String email,
required String otp, required String otp,
String? language,
String? timezone,
}) async { }) async {
return AuthUser(id: 'u1', email: email); return AuthUser(id: 'u1', email: email);
} }
@@ -17,6 +17,7 @@ class _FakeNotificationRepository implements NotificationRepository {
Future<NotificationListResult> listNotifications({ Future<NotificationListResult> listNotifications({
int limit = 20, int limit = 20,
String? cursor, String? cursor,
String locale = 'zh',
}) async { }) async {
return NotificationListResult( return NotificationListResult(
items: items, items: items,
@@ -29,7 +30,10 @@ class _FakeNotificationRepository implements NotificationRepository {
Future<int> getUnreadCount() async => unreadCount; Future<int> getUnreadCount() async => unreadCount;
@override @override
Future<NotificationItem> markRead({required String notificationId}) async { Future<NotificationItem> markRead({
required String notificationId,
String locale = 'zh',
}) async {
if (failMarkRead) { if (failMarkRead) {
throw Exception('Mark read failed'); throw Exception('Mark read failed');
} }