타일 UI 편집 기능 임시 보류 + 로그인 유지 체크박스 추가

- 폰처럼 작은 화면에서 6칸 고정 격자 때문에 레이아웃이 깨지는 문제로,
  타일 드래그 이동/크기조절 기능을 kTileEditingEnabled 플래그로 임시 비활성화
  (관련 코드는 그대로 유지 - 작은 화면 대응 방안 마련 후 플래그만 켜면 재사용 가능)
- 비활성화 상태에서는 화면 폭에 따라 열이 자동으로 줄어드는 기본 그리드 사용
- 설정 화면의 "UI 편집" 항목은 비활성화 표시로 안내
- 로그인 화면에 "로그인 상태 유지" 체크박스 추가 (기본 체크됨, 해제 시 세션 저장 안 함)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-07 22:47:07 +09:00
co-authored by Claude Sonnet 5
parent 7495ece0c8
commit c94f51a033
4 changed files with 106 additions and 28 deletions
+50 -17
View File
@@ -23,6 +23,7 @@ class _LoginScreenState extends State<LoginScreen> {
final LoginController _controller = LoginController();
final TextEditingController _idController = TextEditingController();
final TextEditingController _pwController = TextEditingController();
bool _keepLoggedIn = true;
@override
void dispose() {
@@ -44,14 +45,18 @@ class _LoginScreenState extends State<LoginScreen> {
_showErrorDialog(result.errorMessage!);
break;
case LoginOutcome.masterSuccess:
await SessionStore.save(
SavedSession(
userId: result.studentId!,
userName: result.name!,
role: 'student',
isDeviceMatched: true,
),
);
if (_keepLoggedIn) {
await SessionStore.save(
SavedSession(
userId: result.studentId!,
userName: result.name!,
role: 'student',
isDeviceMatched: true,
),
);
} else {
await SessionStore.clear();
}
if (!mounted) return;
ScaffoldMessenger.of(
context,
@@ -194,14 +199,18 @@ class _LoginScreenState extends State<LoginScreen> {
String name,
bool isDeviceMatched,
) async {
await SessionStore.save(
SavedSession(
userId: studentId,
userName: name,
role: role,
isDeviceMatched: isDeviceMatched,
),
);
if (_keepLoggedIn) {
await SessionStore.save(
SavedSession(
userId: studentId,
userName: name,
role: role,
isDeviceMatched: isDeviceMatched,
),
);
} else {
await SessionStore.clear();
}
if (!mounted) return;
Navigator.pushReplacement(
context,
@@ -349,7 +358,31 @@ class _LoginScreenState extends State<LoginScreen> {
prefixIcon: Icon(Icons.lock),
),
),
const SizedBox(height: 24),
const SizedBox(height: 8),
InkWell(
onTap: () =>
setState(() => _keepLoggedIn = !_keepLoggedIn),
borderRadius: BorderRadius.circular(8),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 4),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Checkbox(
value: _keepLoggedIn,
activeColor: AppPalette.ink,
onChanged: (value) =>
setState(() => _keepLoggedIn = value ?? true),
),
const Text(
'로그인 상태 유지',
style: TextStyle(color: AppPalette.ink),
),
],
),
),
),
const SizedBox(height: 16),
_controller.isLoading
? const CircularProgressIndicator()
: SizedBox(