mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
fix media initial enable to force reload window
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
"bin": "./dist/cli/index.js",
|
||||
"version": "0.6.0-rc.3",
|
||||
"version": "0.6.0-rc.5",
|
||||
"description": "Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, Remix, Astro, Cloudflare, Bun, Node, AWS Lambda & more.",
|
||||
"homepage": "https://bknd.io",
|
||||
"repository": {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Link } from "ui/components/wouter/Link";
|
||||
import { useBrowserTitle } from "ui/hooks/use-browser-title";
|
||||
import * as AppShell from "ui/layouts/AppShell/AppShell";
|
||||
import { Route, Switch } from "wouter";
|
||||
import { Setting } from "./components/Setting";
|
||||
import { Setting, type SettingProps } from "./components/Setting";
|
||||
import { AuthSettings } from "./routes/auth.settings";
|
||||
import { DataSettings } from "./routes/data.settings";
|
||||
import { FlowsSettings } from "./routes/flows.settings";
|
||||
@@ -117,13 +117,24 @@ const SettingRoutesRoutes = () => {
|
||||
<ServerSettings schema={schema.server} config={config.server} />
|
||||
<DataSettings schema={schema.data} config={config.data} />
|
||||
<AuthSettings schema={schema.auth} config={config.auth} />
|
||||
<FallbackRoutes module="media" schema={schema} config={config} uiSchema={uiSchema.media} />
|
||||
<FallbackRoutes
|
||||
module="media"
|
||||
schema={schema}
|
||||
config={config}
|
||||
uiSchema={uiSchema.media}
|
||||
options={{ reloadOnSave: true }}
|
||||
/>
|
||||
<FlowsSettings schema={schema.flows} config={config.flows} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const FallbackRoutes = ({ module, schema, config, ...settingProps }) => {
|
||||
const FallbackRoutes = ({
|
||||
module,
|
||||
schema,
|
||||
config,
|
||||
...settingProps
|
||||
}: SettingProps<any> & { module: string }) => {
|
||||
const { app } = useBknd();
|
||||
const basepath = app.getAdminConfig();
|
||||
const prefix = `~/${basepath}/settings`.replace(/\/+/g, "/");
|
||||
|
||||
Reference in New Issue
Block a user