diff --git a/app/src/ui/Admin.tsx b/app/src/ui/Admin.tsx index 766b56a8..82293c55 100644 --- a/app/src/ui/Admin.tsx +++ b/app/src/ui/Admin.tsx @@ -16,6 +16,11 @@ export type BkndAdminConfig = { * @default `/` */ basepath?: string; + /** + * Sub-path for the Admin UI within the base path + * @default `` + */ + admin_basepath?: string; /** * Path to return to when clicking the logo * @default `/` diff --git a/app/src/ui/lib/routes.ts b/app/src/ui/lib/routes.ts index 46ed4fbe..a2b5bcc6 100644 --- a/app/src/ui/lib/routes.ts +++ b/app/src/ui/lib/routes.ts @@ -101,7 +101,7 @@ export function useNavigate() { } } - const _url = options?.absolute ? `~/${basepath}${url}`.replace(/\/+/g, "/") : url; + const _url = options?.absolute ? `~/${app.options.basepath}/${app.options.admin_basepath}${url}`.replace(/\/+/g, "/") : url; const state = { ...options?.state, referrer: location,