출석 달력 검정색 테마 반영 + 웹에서 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 = [];
|
final List<({String id, Widget child})> tiles = [];
|
||||||
|
|
||||||
if (_isStudent) {
|
if (_isStudent) {
|
||||||
|
// 🌐 웹은 NFC 하드웨어에 접근할 수 없으니, 등록된 기기가 아닐 때와 똑같이
|
||||||
|
// 잠긴 모양(자물쇠 아이콘 + 회색)으로 보여주고 누르면 안내만 뜨게 한다.
|
||||||
|
final bool nfcUnlocked = widget.isDeviceMatched && !kIsWeb;
|
||||||
tiles.add((
|
tiles.add((
|
||||||
id: 'nfc_tag',
|
id: 'nfc_tag',
|
||||||
child: _buildModernCard(
|
child: _buildModernCard(
|
||||||
icon: widget.isDeviceMatched
|
icon: nfcUnlocked ? Icons.contactless_rounded : Icons.lock_rounded,
|
||||||
? Icons.contactless_rounded
|
|
||||||
: Icons.lock_rounded,
|
|
||||||
title: 'NFC 태그',
|
title: 'NFC 태그',
|
||||||
subtitle: widget.isDeviceMatched ? '출석 및 폰 수거 완료' : '본인 인증 기기 전용',
|
subtitle: kIsWeb
|
||||||
color: widget.isDeviceMatched ? _tileAccent : AppPalette.sage,
|
? '스마트폰 앱 전용 기능'
|
||||||
onTap: widget.isDeviceMatched
|
: (widget.isDeviceMatched ? '출석 및 폰 수거 완료' : '본인 인증 기기 전용'),
|
||||||
|
color: nfcUnlocked ? _tileAccent : AppPalette.sage,
|
||||||
|
onTap: nfcUnlocked
|
||||||
? () => _openPocketCheckIn(context)
|
? () => _openPocketCheckIn(context)
|
||||||
: () => AppNotice.show(
|
: () => AppNotice.show(
|
||||||
context,
|
context,
|
||||||
'대리 출석 방지를 위해 등록된 본인 스마트폰에서만 출석 가능합니다.',
|
kIsWeb
|
||||||
|
? 'NFC 태그 기능은 스마트폰 앱에서만 사용할 수 있어요.'
|
||||||
|
: '대리 출석 방지를 위해 등록된 본인 스마트폰에서만 출석 가능합니다.',
|
||||||
icon: Icons.lock_rounded,
|
icon: Icons.lock_rounded,
|
||||||
),
|
),
|
||||||
isActionButton: widget.isDeviceMatched,
|
isActionButton: nfcUnlocked,
|
||||||
isLoading: _controller.isLoading,
|
isLoading: _controller.isLoading,
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
@@ -561,12 +566,20 @@ class _MainDashboardState extends State<MainDashboard> {
|
|||||||
tiles.add((
|
tiles.add((
|
||||||
id: 'nfc_tag_writer',
|
id: 'nfc_tag_writer',
|
||||||
child: _buildModernCard(
|
child: _buildModernCard(
|
||||||
icon: Icons.edit_note_rounded,
|
icon: kIsWeb ? Icons.lock_rounded : Icons.edit_note_rounded,
|
||||||
title: 'NFC 태그 쓰기',
|
title: 'NFC 태그 쓰기',
|
||||||
subtitle: '주머니 스티커 초기 설정',
|
subtitle: kIsWeb ? '스마트폰 앱 전용 기능' : '주머니 스티커 초기 설정',
|
||||||
color: _tileAccent,
|
color: kIsWeb ? AppPalette.sage : _tileAccent,
|
||||||
onTap: () =>
|
onTap: kIsWeb
|
||||||
pushLaunchpad(context, (context) => const NfcTagWriterScreen()),
|
? () => 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.month == today.month &&
|
||||||
date.day == today.day;
|
date.day == today.day;
|
||||||
|
|
||||||
|
final accentColor =
|
||||||
|
globalProfileTheme.value?.accent ?? AppPalette.ink;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => _onDayTap(date),
|
onTap: () => _onDayTap(date),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: studied
|
color: studied ? accentColor : AppPalette.paper,
|
||||||
? AppPalette.ink
|
|
||||||
: AppPalette.paper,
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: isToday
|
color: isToday ? accentColor : AppPalette.sage,
|
||||||
? AppPalette.ink
|
|
||||||
: AppPalette.sage,
|
|
||||||
width: isToday ? 2 : 1,
|
width: isToday ? 2 : 1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -362,7 +360,10 @@ class _StudyCalendarScreenState extends State<StudyCalendarScreen> {
|
|||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
_legendDot(AppPalette.ink, '공부한 날'),
|
_legendDot(
|
||||||
|
globalProfileTheme.value?.accent ?? AppPalette.ink,
|
||||||
|
'공부한 날',
|
||||||
|
),
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
_legendIcon(
|
_legendIcon(
|
||||||
Icons.card_giftcard_rounded,
|
Icons.card_giftcard_rounded,
|
||||||
|
|||||||
Reference in New Issue
Block a user