cc72a67355
- 연간 세무 캘린더(7개 시즌) 기반 자동 Hero 섹션 전환 - 시즌 감지 시 D-Day 카운트다운, 긴박감 배지, 시즌 CTA 표시 - 서비스 카드 순서 시즌 관련 항목 우선 정렬 - 어드민 공지사항 CRUD (등록·수정·삭제, 기간·유형 설정) - 홈페이지 상단 공지 배너 자동 노출 (일반/배너/긴급) - CLAUDE.md에 세무 캘린더 및 마케팅 방향 하네스 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
window.taxbaikAdminSession = {
|
|
syncRouteClass: function () {
|
|
document.documentElement.classList.toggle(
|
|
'admin-login-route',
|
|
window.location.pathname.toLowerCase().endsWith('/admin/login'));
|
|
},
|
|
clearAuthToken: function () {
|
|
try {
|
|
localStorage.removeItem('auth_token');
|
|
} catch {
|
|
// Ignore storage errors; redirect still recovers the session.
|
|
}
|
|
},
|
|
watchReconnect: function () {
|
|
window.taxbaikAdminSession.syncRouteClass();
|
|
window.addEventListener('popstate', window.taxbaikAdminSession.syncRouteClass);
|
|
|
|
const modal = document.getElementById('components-reconnect-modal');
|
|
if (!modal) {
|
|
return;
|
|
}
|
|
|
|
const reloadOnRejectedCircuit = () => {
|
|
const className = modal.className || '';
|
|
if (className.includes('components-reconnect-failed') ||
|
|
className.includes('components-reconnect-rejected')) {
|
|
window.setTimeout(() => window.location.reload(), 1500);
|
|
}
|
|
};
|
|
|
|
new MutationObserver(reloadOnRejectedCircuit)
|
|
.observe(modal, { attributes: true, attributeFilter: ['class'] });
|
|
}
|
|
};
|