diff --git a/lib/ui/group_detail_screen.dart b/lib/ui/group_detail_screen.dart index 573109b..4a9f0d9 100644 --- a/lib/ui/group_detail_screen.dart +++ b/lib/ui/group_detail_screen.dart @@ -217,6 +217,21 @@ class _GroupDetailScreenState extends State { return '$s์ดˆ'; } + /// ๐ŸŽจ ์˜ค๋Š˜ ๊ณต๋ถ€ ์‹œ๊ฐ„ 30๋ถ„ ๋‹จ์œ„๋กœ ํ”„๋กœํ•„ ํ…Œ๋‘๋ฆฌ ์ƒ‰์ด ํฐโ†’๋…ธ๋ž‘โ†’์ฃผํ™ฉโ†’๋นจ๊ฐ•โ†’๋ณด๋ผ๋กœ + /// ์ง„ํ•ด์ง„๋‹ค. 2์‹œ๊ฐ„(4๋‹จ๊ณ„) ๋„˜์œผ๋ฉด ๋ณด๋ผ์ƒ‰์—์„œ ๋ฉˆ์ถ˜๋‹ค. + static const List _studyFrameColors = [ + Color(0xFFE0E0E0), // ํฐ(๊ธฐ๋ณธ) + Color(0xFFFFC107), // ๋…ธ๋ž‘ + Color(0xFFFF9800), // ์ฃผํ™ฉ + Color(0xFFE53935), // ๋นจ๊ฐ• + Color(0xFF8E24AA), // ๋ณด๋ผ + ]; + + Color _studyFrameColor(int todaySeconds) { + final tier = (todaySeconds ~/ 1800).clamp(0, _studyFrameColors.length - 1); + return _studyFrameColors[tier]; + } + void _openTimer() { pushLaunchpad( context, @@ -423,6 +438,31 @@ class _GroupDetailScreenState extends State { color: Colors.grey[500], ), ), + const SizedBox(height: 4), + Row( + children: [ + Text( + 'ํ”„๋กœํ•„ ํ…Œ๋‘๋ฆฌ๋Š” 30๋ถ„๋งˆ๋‹ค ์ƒ‰์ด ์ง„ํ•ด์ ธ์š”', + style: TextStyle( + fontSize: 11.5, + color: Colors.grey[500], + ), + ), + const SizedBox(width: 6), + for (final c in _studyFrameColors) + Padding( + padding: const EdgeInsets.only(left: 2), + child: Container( + width: 10, + height: 10, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: c, + ), + ), + ), + ], + ), const SizedBox(height: 10), GridView.builder( shrinkWrap: true, @@ -438,6 +478,8 @@ class _GroupDetailScreenState extends State { itemBuilder: (context, index) { final m = members[index]; final attended = m['attendedToday'] == true; + final todaySeconds = + (m['todaySeconds'] as num?)?.toInt() ?? 0; return Container( padding: const EdgeInsets.all(10), decoration: BoxDecoration( @@ -454,14 +496,29 @@ class _GroupDetailScreenState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Icon( - attended - ? Icons.check_circle_rounded - : Icons.radio_button_unchecked_rounded, - color: attended - ? Colors.white - : Colors.grey[350], - size: 18, + Container( + width: 30, + height: 30, + padding: const EdgeInsets.all(2.5), + decoration: BoxDecoration( + shape: BoxShape.circle, + border: Border.all( + color: _studyFrameColor(todaySeconds), + width: 3, + ), + ), + child: CircleAvatar( + backgroundColor: attended + ? Colors.white24 + : AppPalette.linen, + child: Icon( + Icons.person_rounded, + size: 13, + color: attended + ? Colors.white + : AppPalette.ink, + ), + ), ), const Spacer(), Text( @@ -488,9 +545,7 @@ class _GroupDetailScreenState extends State { ), const SizedBox(height: 2), Text( - _formatMinutes( - (m['todaySeconds'] as num?)?.toInt() ?? 0, - ), + _formatMinutes(todaySeconds), style: TextStyle( fontSize: 11, color: attended