diff --git a/lib/core/theme/colors.dart b/lib/core/theme/colors.dart index 20f97e3..2a713b4 100644 --- a/lib/core/theme/colors.dart +++ b/lib/core/theme/colors.dart @@ -102,21 +102,19 @@ class AppColors { static Color get primary10Light => _isDarkMode - ? const Color.fromRGBO(104, 151, 151, 0.2) + ? const Color.fromRGBO(41, 111, 221, 0.05) : const Color(0xFFF7FAFF); static Color get primary20 => _isDarkMode - ? const Color.fromRGBO(111, 134, 165, 0.2) - : const Color.fromRGBO(11, 134, 165, 0.2); + ? const Color.fromRGBO(115, 134, 165, 0.3) + : const Color.fromRGBO(229, 239, 255, 1); static Color get primary30 => _isDarkMode ? const Color(0xFF06162E) : const Color(0xFFD9E8FF); static Color get orange10 => - _isDarkMode - ? const Color.fromRGBO(131, 120, 105, 0.2) - : const Color(0xFFFFF2DE); + _isDarkMode ? const Color(0xFF2D2923) : const Color(0xFFFFF7EB); static Color get orange0 => _isDarkMode @@ -156,6 +154,9 @@ class AppColors { static Color get purpleLight => _isDarkMode ? const Color(0xFFEAE6EF) : const Color(0xFFEAE6EF); + static Color get orange20 => + _isDarkMode ? const Color(0xFF6B5E4B) : const Color(0xFFF6D7AB); + static Color get red0 => _isDarkMode ? const Color(0xFF312F2F) @@ -181,5 +182,4 @@ class AppColors { static const Color yellow4 = Color(0xFFC07A25); static const Color secondaryborder = Color(0xFFCDCDCD); static const Color secondaryborder2 = Color(0xFFDADADA); - static const Color orange20 = Color(0xFFF6D7AB); } diff --git a/lib/views/notification/pages/d_notification_page.dart b/lib/views/notification/pages/d_notification_page.dart index 273efaa..820b0be 100644 --- a/lib/views/notification/pages/d_notification_page.dart +++ b/lib/views/notification/pages/d_notification_page.dart @@ -118,7 +118,7 @@ class _DesktopNotificationPageState extends State const Expanded( child: Center( child: CircularProgressIndicator( - color: AppColors.secondary50, + color: AppColors.cyanTeal, ), ), ) @@ -150,9 +150,10 @@ class _DesktopNotificationPageState extends State onTap: () async { final selectedPage = await showDialog( context: context, - builder: (context) => PageSelectionDialog( - totalPages: totalPages, - ), + builder: + (context) => PageSelectionDialog( + totalPages: totalPages, + ), ); if (selectedPage != null) { diff --git a/lib/views/notification/pages/m_notification_page.dart b/lib/views/notification/pages/m_notification_page.dart index dd94b67..4d40c77 100644 --- a/lib/views/notification/pages/m_notification_page.dart +++ b/lib/views/notification/pages/m_notification_page.dart @@ -103,7 +103,7 @@ class _MobileNotificationPageState extends State children: [ NotificationAllTab(scrollController: _scrollAll), NotificationUnreadTab(scrollController: _scrollUnread), - NotificationImportantTab(scrollController: _scrollImportant), + NotificationImportantTab(scrollController: _scrollImportant), ], ), ), @@ -112,7 +112,7 @@ class _MobileNotificationPageState extends State const Padding( padding: EdgeInsets.symmetric(vertical: 16), child: Center( - child: CircularProgressIndicator(color: AppColors.secondary50), + child: CircularProgressIndicator(color: AppColors.cyanTeal), ), ), @@ -120,7 +120,7 @@ class _MobileNotificationPageState extends State const Padding( padding: EdgeInsets.symmetric(vertical: 16), child: Center( - child: CircularProgressIndicator(color: AppColors.secondary50), + child: CircularProgressIndicator(color: AppColors.cyanTeal), ), ), @@ -128,7 +128,7 @@ class _MobileNotificationPageState extends State const Padding( padding: EdgeInsets.symmetric(vertical: 16), child: Center( - child: CircularProgressIndicator(color: AppColors.secondary50), + child: CircularProgressIndicator(color: AppColors.cyanTeal), ), ), ], diff --git a/lib/views/notification/pages/t_notification_page.dart b/lib/views/notification/pages/t_notification_page.dart index 73424d2..9913608 100644 --- a/lib/views/notification/pages/t_notification_page.dart +++ b/lib/views/notification/pages/t_notification_page.dart @@ -119,9 +119,7 @@ class _TabletNotificationPageState extends State if (isLoading) const Expanded( child: Center( - child: CircularProgressIndicator( - color: AppColors.secondary50, - ), + child: CircularProgressIndicator(color: AppColors.cyanTeal), ), ) else @@ -152,9 +150,9 @@ class _TabletNotificationPageState extends State onTap: () async { final selectedPage = await showDialog( context: context, - builder: (context) => PageSelectionDialog( - totalPages: totalPages, - ), + builder: + (context) => + PageSelectionDialog(totalPages: totalPages), ); if (selectedPage != null) { diff --git a/lib/views/notification/widgets/notification_all_tab.dart b/lib/views/notification/widgets/notification_all_tab.dart index d148ddd..7bd3b24 100644 --- a/lib/views/notification/widgets/notification_all_tab.dart +++ b/lib/views/notification/widgets/notification_all_tab.dart @@ -3,6 +3,7 @@ import 'package:provider/provider.dart'; import 'package:tm_app/view_models/notification_view_model.dart'; import 'package:tm_app/views/notification/strings/notification_strings.dart'; +import '../../../core/theme/colors.dart'; import 'notification_card.dart'; class NotificationAllTab extends StatelessWidget { @@ -16,7 +17,9 @@ class NotificationAllTab extends StatelessWidget { if (viewModel.isLoadingAll && (viewModel.allNotificationResponse?.data?.isEmpty ?? true)) { - return const Center(child: CircularProgressIndicator()); + return const Center( + child: CircularProgressIndicator(color: AppColors.cyanTeal), + ); } final notifications = viewModel.allNotificationResponse?.data ?? []; @@ -38,4 +41,3 @@ class NotificationAllTab extends StatelessWidget { ); } } - diff --git a/lib/views/notification/widgets/notification_card.dart b/lib/views/notification/widgets/notification_card.dart index 0d743f2..667385d 100644 --- a/lib/views/notification/widgets/notification_card.dart +++ b/lib/views/notification/widgets/notification_card.dart @@ -123,7 +123,10 @@ class NotificationCard extends StatelessWidget { const Spacer(), TextButton( onPressed: () { - viewModel.markAsRead(notificationId: notification.id!); + if (!notification.seen!) { + viewModel.markAsRead(notificationId: notification.id!); + } + showDialog( context: context, builder: (context) { diff --git a/lib/views/notification/widgets/notification_more_dialog.dart b/lib/views/notification/widgets/notification_more_dialog.dart index 0343981..b1635d7 100644 --- a/lib/views/notification/widgets/notification_more_dialog.dart +++ b/lib/views/notification/widgets/notification_more_dialog.dart @@ -26,7 +26,7 @@ class NotificationMoreDialog extends StatelessWidget { return Dialog( backgroundColor: AppColors.backgroundColor, insetPadding: EdgeInsets.symmetric(horizontal: 24.0.w()), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)), child: Container( width: Size(SizeConfig.screenWidth, SizeConfig.screenHeight).displaySize == @@ -38,6 +38,11 @@ class NotificationMoreDialog extends StatelessWidget { DisplaySize.large ? 720 : double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4), + color: AppColors.primary10Light, + border: Border.all(color: AppColors.primary20), + ), // margin: EdgeInsets.symmetric(horizontal: 24.0.w()), padding: EdgeInsets.symmetric(horizontal: 16.0.w(), vertical: 16.0.h()), child: Column( diff --git a/lib/views/notification/widgets/notification_unread_tab.dart b/lib/views/notification/widgets/notification_unread_tab.dart index a2990a7..354772e 100644 --- a/lib/views/notification/widgets/notification_unread_tab.dart +++ b/lib/views/notification/widgets/notification_unread_tab.dart @@ -1,8 +1,10 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'package:tm_app/core/theme/colors.dart'; import 'package:tm_app/core/utils/size_config.dart'; import 'package:tm_app/view_models/notification_view_model.dart'; import 'package:tm_app/views/notification/strings/notification_strings.dart'; + import 'notification_card.dart'; class NotificationUnreadTab extends StatelessWidget { @@ -14,7 +16,9 @@ class NotificationUnreadTab extends StatelessWidget { final viewModel = context.watch(); if (viewModel.isLoadingUnread && (viewModel.unreadNotificationResponse?.data?.isEmpty ?? true)) { - return const Center(child: CircularProgressIndicator()); + return const Center( + child: CircularProgressIndicator(color: AppColors.cyanTeal), + ); } final notifications = viewModel.unreadNotificationResponse?.data ?? [];