feat: full-screen loading page with fade-in on init complete

- AppProvider: add 'ready' flag set after init (auth restore + settings)
- page.js: show LoadingScreen (spinner + forum name) until ready, then
  fade in main UI (.app-fade-in 0.4s) — no more unloaded UI flash
This commit is contained in:
lezi-fun committed 2026-08-10 16:44:21 +08:00
1 parent 4d4c227f58
commit ae8299820f
4 files changed
+80 -3

No files matched your search

+53
View File
@@ -1198,3 +1198,56 @@ svg {
padding: 2px 6px !important;
}
}
/* ===== 全屏加载页 ===== */
.loading-screen {
position: fixed;
inset: 0;
z-index: 99999;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg);
transition: background var(--transition);
}
.loading-inner {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.loading-spinner {
width: 44px;
height: 44px;
border: 4px solid var(--border);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
.loading-title {
font-size: 20px;
font-weight: 700;
color: var(--text);
}
.loading-sub {
font-size: 13px;
color: var(--text-light);
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* ===== 主界面淡入(初始化完成) ===== */
.app-fade-in {
animation: appFadeIn 0.4s ease-out;
}
@keyframes appFadeIn {
from { opacity: 0; }
to { opacity: 1; }
}