로그인 화면 아이디/비밀번호 입력칸 폭 제한 (데스크톱 웹에서 너무 넓게 늘어지던 문제 수정)

This commit is contained in:
2026-08-05 14:07:06 +09:00
parent 4e12b279e2
commit dca7912f8d
+111 -104
View File
@@ -421,121 +421,128 @@ class _LoginScreenState extends State<LoginScreen> {
body: Center(
child: SingleChildScrollView(
padding: const EdgeInsets.all(24.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(Icons.school, size: 80, color: Colors.indigo),
const SizedBox(height: 16),
const Text(
'백산고등학교 모니터',
style: TextStyle(
fontSize: 26,
fontWeight: FontWeight.bold,
color: Colors.indigo,
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 420),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(Icons.school, size: 80, color: Colors.indigo),
const SizedBox(height: 16),
const Text(
'백산고등학교 모니터',
style: TextStyle(
fontSize: 26,
fontWeight: FontWeight.bold,
color: Colors.indigo,
),
),
),
const SizedBox(height: 8),
const Text(
'학생 편의 및 학교생활 도우미',
style: TextStyle(color: Colors.grey, fontSize: 15),
),
const SizedBox(height: 40),
TextField(
controller: _idController,
textInputAction: TextInputAction.next,
decoration: const InputDecoration(
labelText: '학번 또는 교직원 번호',
border: OutlineInputBorder(),
prefixIcon: Icon(Icons.person),
const SizedBox(height: 8),
const Text(
'학생 편의 및 학교생활 도우미',
style: TextStyle(color: Colors.grey, fontSize: 15),
),
),
const SizedBox(height: 16),
TextField(
controller: _pwController,
obscureText: true,
textInputAction: TextInputAction.done,
onSubmitted: (_) => _login(),
decoration: const InputDecoration(
labelText: '비밀번호',
border: OutlineInputBorder(),
prefixIcon: Icon(Icons.lock),
const SizedBox(height: 40),
TextField(
controller: _idController,
textInputAction: TextInputAction.next,
decoration: const InputDecoration(
labelText: '학번 또는 교직원 번호',
border: OutlineInputBorder(),
prefixIcon: Icon(Icons.person),
),
),
),
const SizedBox(height: 24),
_isLoading
? const CircularProgressIndicator()
: SizedBox(
width: double.infinity,
height: 55,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.indigo,
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
const SizedBox(height: 16),
TextField(
controller: _pwController,
obscureText: true,
textInputAction: TextInputAction.done,
onSubmitted: (_) => _login(),
decoration: const InputDecoration(
labelText: '비밀번호',
border: OutlineInputBorder(),
prefixIcon: Icon(Icons.lock),
),
),
const SizedBox(height: 24),
_isLoading
? const CircularProgressIndicator()
: SizedBox(
width: double.infinity,
height: 55,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.indigo,
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
onPressed: _login,
child: const Text(
'로그인',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
onPressed: _login,
child: const Text(
'로그인',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
),
),
const SizedBox(height: 4),
TextButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const TeacherRegisterScreen(),
),
),
child: const Text(
'👨‍🏫 선생님이신가요? 교사 회원가입 하기',
style: TextStyle(
color: Colors.indigo,
fontWeight: FontWeight.bold,
),
const SizedBox(height: 4),
TextButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const TeacherRegisterScreen(),
),
),
child: const Text(
'👨‍🏫 선생님이신가요? 교사 회원가입 하기',
style: TextStyle(
color: Colors.indigo,
fontWeight: FontWeight.bold,
),
const Divider(height: 40),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
TextButton.icon(
icon: const Icon(
Icons.gavel,
size: 18,
color: Colors.grey,
),
label: const Text(
'교사 간편인증',
style: TextStyle(color: Colors.grey),
),
onPressed: () => _showLegacyPasswordDialog(
'선생님',
'1234',
const TeacherDashboard(),
),
),
TextButton.icon(
icon: const Icon(
Icons.settings,
size: 18,
color: Colors.grey,
),
label: const Text(
'관리자 간편인증',
style: TextStyle(color: Colors.grey),
),
onPressed: () => _showLegacyPasswordDialog(
'시스템 관리자',
'4936',
const AdminDashboard(),
),
),
],
),
),
const Divider(height: 40),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
TextButton.icon(
icon: const Icon(Icons.gavel, size: 18, color: Colors.grey),
label: const Text(
'교사 간편인증',
style: TextStyle(color: Colors.grey),
),
onPressed: () => _showLegacyPasswordDialog(
'선생님',
'1234',
const TeacherDashboard(),
),
),
TextButton.icon(
icon: const Icon(
Icons.settings,
size: 18,
color: Colors.grey,
),
label: const Text(
'관리자 간편인증',
style: TextStyle(color: Colors.grey),
),
onPressed: () => _showLegacyPasswordDialog(
'시스템 관리자',
'4936',
const AdminDashboard(),
),
),
],
),
],
],
),
),
),
),