앱 전체 배경/카드 색상을 coolors 팔레트로 통일
coolors.co 무채색 팔레트(1c1c1c-daddd8-ecebe4-eef0f2-fafaff)를 lib/theme/app_palette.dart에 정의하고, 로그인/대시보드/출석 확인/ 학생 계정 관리/스마트기기 반출(신청·대장)/관리자 화면 전반의 배너·배경·카드·기본 버튼 색을 이 팔레트로 교체. 기능적으로 의미 있는 색(위반/미출석/삭제/거절 등 경고성 빨간색, 승인 대기 등 상태 표시)은 그대로 유지 — 구조적/장식적 색상만 무채색으로 통일해 위험한 동작이 시각적으로 더 도드라지게 함. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+23
-28
@@ -4,6 +4,7 @@
|
||||
// 계정 강제 삭제 서버 통신은 lib/function/student_dashboard_controller.dart가 담당한다.
|
||||
import 'package:flutter/material.dart';
|
||||
import '../function/student_dashboard_controller.dart';
|
||||
import '../theme/app_palette.dart';
|
||||
import 'admin_dashboard.dart';
|
||||
import 'device_checkout_ledger_page.dart';
|
||||
import 'device_checkout_request_screen.dart';
|
||||
@@ -160,34 +161,34 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
);
|
||||
}
|
||||
|
||||
// 🎨 [역할별 테마] 배너 색상/제목/문구만 역할에 따라 다르게. 레이아웃 자체는 공통.
|
||||
// 🎨 [역할별 테마] 배너 색상은 팔레트로 통일하고, 제목/문구/아이콘만 역할에 따라 다르게.
|
||||
({String title, String subtitle, Color color, IconData icon}) _theme() {
|
||||
if (_isDeveloper) {
|
||||
return (
|
||||
title: '👑 MASTER CONTROL',
|
||||
subtitle: '최고 관리 권한 활성화됨',
|
||||
color: Colors.deepPurple[700]!,
|
||||
color: AppPalette.ink,
|
||||
icon: Icons.admin_panel_settings_rounded,
|
||||
);
|
||||
} else if (widget.role == 'admin') {
|
||||
return (
|
||||
title: '🛠️ ADMIN CONTROL',
|
||||
subtitle: '시스템 관리자 권한 활성화됨',
|
||||
color: Colors.deepPurple[700]!,
|
||||
color: AppPalette.ink,
|
||||
icon: Icons.admin_panel_settings_rounded,
|
||||
);
|
||||
} else if (widget.role == 'teacher') {
|
||||
return (
|
||||
title: '👨🏫 TEACHER PORTAL',
|
||||
subtitle: '교직원 번호: $_displayId | 교사 권한 활성화됨',
|
||||
color: Colors.green[700]!,
|
||||
color: AppPalette.ink,
|
||||
icon: Icons.admin_panel_settings_rounded,
|
||||
);
|
||||
}
|
||||
return (
|
||||
title: '🎓 STUDENT PORTAL',
|
||||
subtitle: '학번: $_displayId | 인증 완료',
|
||||
color: Colors.indigo[700]!,
|
||||
color: AppPalette.ink,
|
||||
icon: Icons.school_rounded,
|
||||
);
|
||||
}
|
||||
@@ -200,7 +201,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
final theme = _theme();
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.grey[100],
|
||||
backgroundColor: AppPalette.mist,
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
theme.title,
|
||||
@@ -250,7 +251,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
),
|
||||
child: CircleAvatar(
|
||||
radius: 30,
|
||||
backgroundColor: theme.color.withValues(alpha: 0.08),
|
||||
backgroundColor: AppPalette.linen,
|
||||
child: Icon(theme.icon, size: 32, color: theme.color),
|
||||
),
|
||||
),
|
||||
@@ -298,7 +299,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black87,
|
||||
color: AppPalette.ink,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -335,8 +336,8 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
? '출석 및 폰 수거 완료'
|
||||
: '⚠️ 본인 인증 기기 전용',
|
||||
color: widget.isDeviceMatched
|
||||
? Colors.blue
|
||||
: Colors.grey[400]!,
|
||||
? AppPalette.ink
|
||||
: AppPalette.sage,
|
||||
onTap: widget.isDeviceMatched
|
||||
? () => _openPocketCheckIn(context)
|
||||
: () {
|
||||
@@ -358,7 +359,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
icon: Icons.fastfood_rounded,
|
||||
title: '실시간 학교 상황',
|
||||
subtitle: '급식실 줄 & 매점 재고 확인',
|
||||
color: Colors.orange[700]!,
|
||||
color: AppPalette.ink,
|
||||
onTap: () {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
@@ -374,7 +375,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
icon: Icons.tablet_mac_rounded,
|
||||
title: '스마트기기 반출',
|
||||
subtitle: '패드 사용 신청 (시간/목적)',
|
||||
color: Colors.teal,
|
||||
color: AppPalette.ink,
|
||||
onTap: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
@@ -393,7 +394,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
icon: Icons.assignment_turned_in_rounded,
|
||||
title: '실시간 출석 확인',
|
||||
subtitle: '학생 제출 로그 모니터링',
|
||||
color: Colors.blue,
|
||||
color: AppPalette.ink,
|
||||
onTap: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
@@ -407,7 +408,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
icon: Icons.manage_accounts_rounded,
|
||||
title: '학생 계정 관리',
|
||||
subtitle: '계정 추가 및 강제 리셋',
|
||||
color: Colors.orange,
|
||||
color: AppPalette.ink,
|
||||
onTap: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
@@ -421,7 +422,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
icon: Icons.tablet_mac_rounded,
|
||||
title: '스마트기기 반출 대장',
|
||||
subtitle: '패드 반출 신청 승인/거절',
|
||||
color: Colors.teal,
|
||||
color: AppPalette.ink,
|
||||
onTap: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
@@ -440,7 +441,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
icon: Icons.terminal_rounded,
|
||||
title: '서버 DB 제어',
|
||||
subtitle: '시스템 원격 초기화',
|
||||
color: Colors.amber[800]!,
|
||||
color: AppPalette.ink,
|
||||
onTap: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
@@ -462,7 +463,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
icon: Icons.edit_note_rounded,
|
||||
title: 'NFC 태그 쓰기',
|
||||
subtitle: '주머니 스티커 초기 설정',
|
||||
color: Colors.deepPurple,
|
||||
color: AppPalette.ink,
|
||||
onTap: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
@@ -503,15 +504,9 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
child: Ink(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: AppPalette.paper,
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.04),
|
||||
blurRadius: 16,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
border: Border.all(color: AppPalette.sage, width: 1),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -520,7 +515,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: color.withValues(alpha: 0.1),
|
||||
color: AppPalette.linen,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Icon(icon, color: color, size: 28),
|
||||
@@ -537,7 +532,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black87,
|
||||
color: AppPalette.ink,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -560,7 +555,7 @@ class _MainDashboardState extends State<MainDashboard> {
|
||||
subtitle,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey[500],
|
||||
color: AppPalette.ink.withValues(alpha: 0.55),
|
||||
height: 1.2,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user