Files
taxbaik/TaxBaik.Web/wwwroot/js/admin-session.js
T
kjh2064 d58e524dfc
TaxBaik CI/CD / build-and-deploy (push) Successful in 56s
TaxBaik Browser E2E / browser-e2e (push) Failing after 3m3s
fix: 배포 후 관리자 세션 복구 처리
2026-06-27 21:38:11 +09:00

27 lines
886 B
JavaScript

window.taxbaikAdminSession = {
clearAuthToken: function () {
try {
localStorage.removeItem('auth_token');
} catch {
// Ignore storage errors; redirect still recovers the session.
}
},
watchReconnect: function () {
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'] });
}
};