mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
admin: fix theme flash
This commit is contained in:
@@ -51,7 +51,7 @@ export class AdminController extends Controller {
|
||||
basepath: this._options.basepath ?? "/",
|
||||
adminBasepath: this._options.adminBasepath ?? "",
|
||||
assetsPath: this._options.assetsPath ?? config.server.assets_path,
|
||||
theme: this._options.theme ?? "system",
|
||||
//theme: this._options.theme ?? "system",
|
||||
logo_return_path: this._options.logoReturnPath ?? "/",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ export default function Admin({
|
||||
|
||||
const Skeleton = ({ theme }: { theme?: any }) => {
|
||||
const t = useTheme();
|
||||
const actualTheme = theme ?? t.theme;
|
||||
const actualTheme = theme && ["dark", "light"].includes(theme) ? theme : t.theme;
|
||||
|
||||
return (
|
||||
<div id="bknd-admin" className={actualTheme + " antialiased"}>
|
||||
|
||||
@@ -185,9 +185,7 @@ function UserMenu() {
|
||||
}
|
||||
}
|
||||
|
||||
if (!options.theme) {
|
||||
items.push(() => <UserMenuThemeToggler />);
|
||||
}
|
||||
items.push(() => <UserMenuThemeToggler />);
|
||||
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">
|
||||
{getVersion()}
|
||||
|
||||
Reference in New Issue
Block a user