fix: 배포 후 관리자 세션 복구 처리
TaxBaik CI/CD / build-and-deploy (push) Successful in 56s
TaxBaik Browser E2E / browser-e2e (push) Failing after 3m3s

This commit is contained in:
2026-06-27 21:38:11 +09:00
parent 661ffbbf2c
commit d58e524dfc
6 changed files with 95 additions and 2 deletions
+35
View File
@@ -169,6 +169,41 @@ button:disabled {
opacity: 0.6;
}
.admin-reconnect-modal {
display: none;
}
.admin-reconnect-modal.components-reconnect-show,
.admin-reconnect-modal.components-reconnect-failed,
.admin-reconnect-modal.components-reconnect-rejected {
position: fixed;
inset: 0;
z-index: 10000;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
background: rgba(15, 23, 42, 0.48);
}
.admin-reconnect-card {
width: min(420px, 100%);
padding: 24px;
border-radius: 16px;
background: #fff;
box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}
.admin-reconnect-card strong,
.admin-reconnect-card span {
display: block;
}
.admin-reconnect-card span {
margin-top: 8px;
color: #64748b;
}
/* Responsive */
@media (max-width: 600px) {
.mud-container-maxwidth-small {
+26
View File
@@ -0,0 +1,26 @@
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'] });
}
};