출석 달력 검정색 테마 반영 + 웹에서 NFC 타일 잠금 처리
출석 달력: 공부한 날 표시/오늘 테두리/범례가 AppPalette.ink로 고정돼 있어서 테마를 적용해도 검정으로 남아있던 것을 테마 강조색으로 바꿨다. 메인 대시보드: 웹은 NFC 하드웨어에 접근할 수 없으므로, "등록된 기기가 아닐 때"와 똑같은 패턴(자물쇠 아이콘 + 회색 + 탭하면 안내 메시지)으로 NFC 태그/NFC 태그 쓰기 타일을 잠근다. 실제 눌러지는 동작은 기존 기기 불일치 처리와 동일하게 안내만 띄우고 화면 이동은 막는 방식이다.
This commit is contained in:
+26
-13
@@ -307,23 +307,28 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
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<MainDashboard> {
|
||||
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(),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
@@ -313,18 +313,16 @@ class _StudyCalendarScreenState extends State<StudyCalendarScreen> {
|
||||
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<StudyCalendarScreen> {
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
children: [
|
||||
_legendDot(AppPalette.ink, '공부한 날'),
|
||||
_legendDot(
|
||||
globalProfileTheme.value?.accent ?? AppPalette.ink,
|
||||
'공부한 날',
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
_legendIcon(
|
||||
Icons.card_giftcard_rounded,
|
||||
|
||||
Reference in New Issue
Block a user