debug: AuthManager 및 DOM 상태 디버깅 로그 추가
🔍 Debug Logs Added: - AuthManager.checkAuth() 상세 상태 로그 - localStorage 토큰/사용자 정보 존재 여부 확인 - currentUser 전역 변수 업데이트 로그 - DOM 요소 존재 여부 및 화면 전환 상태 확인 🎯 Issue Analysis: - AuthManager 정상 작동 확인됨 (✅ 캐시된 인증 정보 사용) - 공통 헤더 초기화 성공 - currentUser undefined 문제 → 전역 변수 동기화 이슈 - 로그인 창 보임 → DOM 조작 실패 가능성 🔧 Enhanced Debugging: - 🖥️ 화면 전환 시작/완료 로그 - loginScreen/mainScreen 요소 존재 확인 - CSS 클래스 적용 상태 확인 - 화면 전환 실패 시 에러 로그 Next Step: 콘솔 로그 확인하여 정확한 실패 지점 파악
This commit is contained in:
@@ -555,6 +555,7 @@
|
||||
|
||||
if (user) {
|
||||
currentUser = user;
|
||||
console.log('✅ currentUser 전역 변수 업데이트:', currentUser.username);
|
||||
|
||||
// 공통 헤더 초기화
|
||||
console.log('🔧 공통 헤더 초기화 시작:', user.username);
|
||||
@@ -582,8 +583,22 @@
|
||||
}, 500);
|
||||
|
||||
// 메인 화면 표시
|
||||
document.getElementById('loginScreen').classList.add('hidden');
|
||||
document.getElementById('mainScreen').classList.remove('hidden');
|
||||
console.log('🖥️ 화면 전환 시작');
|
||||
const loginScreen = document.getElementById('loginScreen');
|
||||
const mainScreen = document.getElementById('mainScreen');
|
||||
|
||||
console.log('loginScreen 요소:', !!loginScreen);
|
||||
console.log('mainScreen 요소:', !!mainScreen);
|
||||
|
||||
if (loginScreen && mainScreen) {
|
||||
loginScreen.classList.add('hidden');
|
||||
mainScreen.classList.remove('hidden');
|
||||
console.log('✅ 메인 화면으로 전환 완료');
|
||||
console.log('loginScreen hidden:', loginScreen.classList.contains('hidden'));
|
||||
console.log('mainScreen hidden:', mainScreen.classList.contains('hidden'));
|
||||
} else {
|
||||
console.error('❌ 화면 요소를 찾을 수 없음');
|
||||
}
|
||||
|
||||
// 데이터 로드
|
||||
await loadProjects();
|
||||
|
||||
Reference in New Issue
Block a user