diff --git a/app/src/modules/server/AdminController.tsx b/app/src/modules/server/AdminController.tsx index 59fcda3..2583a76 100644 --- a/app/src/modules/server/AdminController.tsx +++ b/app/src/modules/server/AdminController.tsx @@ -30,7 +30,7 @@ export type AdminControllerOptions = { html?: string; forceDev?: boolean | { mainPath: string }; debugRerenders?: boolean; - theme?: "dark" | "light" | "system"; + theme?: AppTheme; logoReturnPath?: string; }; diff --git a/app/src/ui/client/utils/AppReduced.ts b/app/src/ui/client/utils/AppReduced.ts index e69f542..2b703d2 100644 --- a/app/src/ui/client/utils/AppReduced.ts +++ b/app/src/ui/client/utils/AppReduced.ts @@ -95,12 +95,14 @@ export class AppReduced { } getSettingsPath(path: string[] = []): string { - const base = `~/${this.options.admin_basepath}/settings` + const basePath = this.options.admin_basepath ? `~/${this.options.admin_basepath}` : '~'; + const base = `${basePath}/settings` return normalizeAdminPath([base, ...path].join("/")); } getAbsolutePath(path?: string): string { - return normalizeAdminPath((path ? `~/${this.options.admin_basepath}/${path}` : `~/${this.options.admin_basepath}`)); + const basePath = this.options.admin_basepath ? `~/${this.options.admin_basepath}` : '~'; + return normalizeAdminPath(path ? `${basePath}/${path}` : basePath); } getAuthConfig() {