mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
admin: fix theme flash
This commit is contained in:
@@ -51,7 +51,7 @@ export class AdminController extends Controller {
|
|||||||
basepath: this._options.basepath ?? "/",
|
basepath: this._options.basepath ?? "/",
|
||||||
adminBasepath: this._options.adminBasepath ?? "",
|
adminBasepath: this._options.adminBasepath ?? "",
|
||||||
assetsPath: this._options.assetsPath ?? config.server.assets_path,
|
assetsPath: this._options.assetsPath ?? config.server.assets_path,
|
||||||
theme: this._options.theme ?? "system",
|
//theme: this._options.theme ?? "system",
|
||||||
logo_return_path: this._options.logoReturnPath ?? "/",
|
logo_return_path: this._options.logoReturnPath ?? "/",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export default function Admin({
|
|||||||
|
|
||||||
const Skeleton = ({ theme }: { theme?: any }) => {
|
const Skeleton = ({ theme }: { theme?: any }) => {
|
||||||
const t = useTheme();
|
const t = useTheme();
|
||||||
const actualTheme = theme ?? t.theme;
|
const actualTheme = theme && ["dark", "light"].includes(theme) ? theme : t.theme;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="bknd-admin" className={actualTheme + " antialiased"}>
|
<div id="bknd-admin" className={actualTheme + " antialiased"}>
|
||||||
|
|||||||
@@ -185,9 +185,7 @@ function UserMenu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!options.theme) {
|
items.push(() => <UserMenuThemeToggler />);
|
||||||
items.push(() => <UserMenuThemeToggler />);
|
|
||||||
}
|
|
||||||
items.push(() => (
|
items.push(() => (
|
||||||
<div className="font-mono leading-none text-xs text-primary/50 text-center pb-1 pt-2 mt-1 border-t border-primary/5">
|
<div className="font-mono leading-none text-xs text-primary/50 text-center pb-1 pt-2 mt-1 border-t border-primary/5">
|
||||||
{getVersion()}
|
{getVersion()}
|
||||||
|
|||||||
2
bun.lock
2
bun.lock
@@ -15,7 +15,7 @@
|
|||||||
},
|
},
|
||||||
"app": {
|
"app": {
|
||||||
"name": "bknd",
|
"name": "bknd",
|
||||||
"version": "0.15.0-rc.3",
|
"version": "0.15.0-rc.8",
|
||||||
"bin": "./dist/cli/index.js",
|
"bin": "./dist/cli/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cfworker/json-schema": "^4.1.1",
|
"@cfworker/json-schema": "^4.1.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user