Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Commit 966b069

Browse files
committed
fix: render loading state immediately in initAdmin to prevent black screen on admin login
1 parent 2b6995a commit 966b069

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

public/js/admin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,6 +1750,11 @@ function initAdmin() {
17501750
document.head.appendChild(meta);
17511751
}
17521752

1753+
// Render a loading state immediately so the user never sees a blank screen
1754+
if (app) {
1755+
app.innerHTML = '<div class="auth-page"><div class="auth-card" style="text-align:center;padding:48px"><span class="spinner" style="width:32px;height:32px;border-width:3px;margin:0 auto 16px"></span><p style="color:var(--text-secondary)">Loading admin panel...</p></div></div>';
1756+
}
1757+
17531758
const token = localStorage.getItem(ADMIN_STORAGE_KEY);
17541759
if (token) {
17551760
adminState.token = token;

0 commit comments

Comments
 (0)