From 1d9b86d3e8fd61b273c53c2f1487ca898aa9788f Mon Sep 17 00:00:00 2001 From: sihoo Date: Thu, 1 Oct 2026 23:34:54 +0000 Subject: [PATCH] =?UTF-8?q?=EC=B6=9C=EC=84=9D=20=EB=8B=AC=EB=A0=A5=20?= =?UTF-8?q?=EA=B2=80=EC=A0=95=EC=83=89=20=ED=85=8C=EB=A7=88=20=EB=B0=98?= =?UTF-8?q?=EC=98=81=20+=20=EC=9B=B9=EC=97=90=EC=84=9C=20NFC=20=ED=83=80?= =?UTF-8?q?=EC=9D=BC=20=EC=9E=A0=EA=B8=88=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 출석 달력: 공부한 날 표시/오늘 테두리/범례가 AppPalette.ink로 고정돼 있어서 테마를 적용해도 검정으로 남아있던 것을 테마 강조색으로 바꿨다. 메인 대시보드: 웹은 NFC 하드웨어에 접근할 수 없으므로, "등록된 기기가 아닐 때"와 똑같은 패턴(자물쇠 아이콘 + 회색 + 탭하면 안내 메시지)으로 NFC 태그/NFC 태그 쓰기 타일을 잠근다. 실제 눌러지는 동작은 기존 기기 불일치 처리와 동일하게 안내만 띄우고 화면 이동은 막는 방식이다. --- lib/ui/main_dashboard.dart | 39 ++++++++++++++++++++----------- lib/ui/study_calendar_screen.dart | 15 ++++++------ 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/lib/ui/main_dashboard.dart b/lib/ui/main_dashboard.dart index 604e7e8..0f0239f 100644 --- a/lib/ui/main_dashboard.dart +++ b/lib/ui/main_dashboard.dart @@ -307,23 +307,28 @@ class _MainDashboardState extends State { final List<({String id, Widget child})> tiles = []; if (_isStudent) { + // 🌐 웹은 NFC 하드웨어에 접근할 수 없으니, 등록된 기기가 아닐 때와 똑같이 + // 잠긴 모양(자물쇠 아이콘 + 회색)으로 보여주고 누르면 안내만 뜨게 한다. + final bool nfcUnlocked = widget.isDeviceMatched && !kIsWeb; tiles.add(( id: 'nfc_tag', child: _buildModernCard( - icon: widget.isDeviceMatched - ? Icons.contactless_rounded - : Icons.lock_rounded, + icon: nfcUnlocked ? Icons.contactless_rounded : Icons.lock_rounded, title: 'NFC 태그', - subtitle: widget.isDeviceMatched ? '출석 및 폰 수거 완료' : '본인 인증 기기 전용', - color: widget.isDeviceMatched ? _tileAccent : AppPalette.sage, - onTap: widget.isDeviceMatched + subtitle: kIsWeb + ? '스마트폰 앱 전용 기능' + : (widget.isDeviceMatched ? '출석 및 폰 수거 완료' : '본인 인증 기기 전용'), + color: nfcUnlocked ? _tileAccent : AppPalette.sage, + onTap: nfcUnlocked ? () => _openPocketCheckIn(context) : () => AppNotice.show( context, - '대리 출석 방지를 위해 등록된 본인 스마트폰에서만 출석 가능합니다.', + kIsWeb + ? 'NFC 태그 기능은 스마트폰 앱에서만 사용할 수 있어요.' + : '대리 출석 방지를 위해 등록된 본인 스마트폰에서만 출석 가능합니다.', icon: Icons.lock_rounded, ), - isActionButton: widget.isDeviceMatched, + isActionButton: nfcUnlocked, isLoading: _controller.isLoading, ), )); @@ -561,12 +566,20 @@ class _MainDashboardState extends State { tiles.add(( id: 'nfc_tag_writer', child: _buildModernCard( - icon: Icons.edit_note_rounded, + icon: kIsWeb ? Icons.lock_rounded : Icons.edit_note_rounded, title: 'NFC 태그 쓰기', - subtitle: '주머니 스티커 초기 설정', - color: _tileAccent, - onTap: () => - pushLaunchpad(context, (context) => const NfcTagWriterScreen()), + subtitle: kIsWeb ? '스마트폰 앱 전용 기능' : '주머니 스티커 초기 설정', + color: kIsWeb ? AppPalette.sage : _tileAccent, + onTap: kIsWeb + ? () => AppNotice.show( + context, + 'NFC 태그 쓰기는 스마트폰 앱에서만 사용할 수 있어요.', + icon: Icons.lock_rounded, + ) + : () => pushLaunchpad( + context, + (context) => const NfcTagWriterScreen(), + ), ), )); } diff --git a/lib/ui/study_calendar_screen.dart b/lib/ui/study_calendar_screen.dart index aefa5bd..1b5adfe 100644 --- a/lib/ui/study_calendar_screen.dart +++ b/lib/ui/study_calendar_screen.dart @@ -313,18 +313,16 @@ class _StudyCalendarScreenState extends State { date.month == today.month && date.day == today.day; + final accentColor = + globalProfileTheme.value?.accent ?? AppPalette.ink; return GestureDetector( onTap: () => _onDayTap(date), child: Container( decoration: BoxDecoration( - color: studied - ? AppPalette.ink - : AppPalette.paper, + color: studied ? accentColor : AppPalette.paper, borderRadius: BorderRadius.circular(12), border: Border.all( - color: isToday - ? AppPalette.ink - : AppPalette.sage, + color: isToday ? accentColor : AppPalette.sage, width: isToday ? 2 : 1, ), ), @@ -362,7 +360,10 @@ class _StudyCalendarScreenState extends State { const SizedBox(height: 16), Row( children: [ - _legendDot(AppPalette.ink, '공부한 날'), + _legendDot( + globalProfileTheme.value?.accent ?? AppPalette.ink, + '공부한 날', + ), const SizedBox(width: 16), _legendIcon( Icons.card_giftcard_rounded,