mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
Add loading indicator for admin asset initialization
Introduced a "loading" div to indicate when admin assets are being fetched. Updated rendering logic and styles in related components to account for this state. Prepared groundwork for potential view transitions.
This commit is contained in:
@@ -140,11 +140,13 @@ export class AdminController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
const theme = configs.server.admin.color_scheme ?? "light";
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
{/* dnd complains otherwise */}
|
||||
{html`<!DOCTYPE html>`}
|
||||
<html lang="en" class={configs.server.admin.color_scheme ?? "light"}>
|
||||
<html lang="en" class={theme}>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta
|
||||
@@ -173,9 +175,24 @@ export class AdminController extends Controller {
|
||||
</Fragment>
|
||||
)}
|
||||
</head>
|
||||
<body>
|
||||
<body style={{ backgroundColor: theme === "light" ? "#fff" : "#000" }}>
|
||||
<div id="root" />
|
||||
<div id="app" />
|
||||
<div id="app">
|
||||
<div
|
||||
id="loading"
|
||||
style={{
|
||||
height: "100vh",
|
||||
width: "100vw",
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
fontFamily: "monospace",
|
||||
opacity: 0.3
|
||||
}}
|
||||
>
|
||||
Initializing...
|
||||
</div>
|
||||
</div>
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: bknd_context
|
||||
|
||||
Reference in New Issue
Block a user