diff --git a/app/build.ts b/app/build.ts
index 66db700..e60e0e3 100644
--- a/app/build.ts
+++ b/app/build.ts
@@ -252,6 +252,8 @@ async function buildAdapters() {
platform: "neutral",
entry: ["src/adapter/index.ts"],
outDir: "dist/adapter",
+ // only way to keep @vite-ignore comments
+ minify: false,
}),
// specific adatpers
diff --git a/app/src/App.ts b/app/src/App.ts
index 4712c55..ea88f42 100644
--- a/app/src/App.ts
+++ b/app/src/App.ts
@@ -98,9 +98,6 @@ export type AppOptions = {
readonly?: boolean;
};
export type CreateAppConfig = {
- /**
- * bla
- */
connection?: Connection | { url: string };
config?: InitialModuleConfigs;
options?: AppOptions;
diff --git a/app/src/auth/authenticate/Authenticator.ts b/app/src/auth/authenticate/Authenticator.ts
index 0350aba..52a2e42 100644
--- a/app/src/auth/authenticate/Authenticator.ts
+++ b/app/src/auth/authenticate/Authenticator.ts
@@ -278,7 +278,9 @@ export class Authenticator<
}
return payload as any;
- } catch (e) {}
+ } catch (e) {
+ $console.debug("Authenticator jwt verify error", String(e));
+ }
return;
}
@@ -396,8 +398,9 @@ export class Authenticator<
if (headers.has("Authorization")) {
const bearerHeader = String(headers.get("Authorization"));
token = bearerHeader.replace("Bearer ", "");
- } else if (is_context) {
- token = await this.getAuthCookie(c as Context);
+ } else {
+ const context = is_context ? (c as Context) : ({ req: { raw: { headers } } } as Context);
+ token = await this.getAuthCookie(context);
}
if (token) {
diff --git a/app/src/modules/server/AdminController.tsx b/app/src/modules/server/AdminController.tsx
index a68519d..2800781 100644
--- a/app/src/modules/server/AdminController.tsx
+++ b/app/src/modules/server/AdminController.tsx
@@ -192,7 +192,7 @@ export class AdminController extends Controller {
const assets = {
js: "main.js",
- css: "styles.css",
+ css: ["styles.css"],
};
if (isProd) {
@@ -213,9 +213,12 @@ export class AdminController extends Controller {
}
try {
- // @todo: load all marked as entry (incl. css)
- assets.js = manifest["src/ui/main.tsx"]?.file!;
- assets.css = manifest["src/ui/main.tsx"]?.css?.[0] as any;
+ const entry = Object.values(manifest).find((m) => m.isEntry);
+ if (!entry) {
+ throw new Error("No entry found in manifest");
+ }
+ assets.js = entry?.file;
+ assets.css = entry?.css ?? [];
} catch (e) {
$console.warn("Couldn't find assets in manifest", e);
}
@@ -245,7 +248,9 @@ export class AdminController extends Controller {
{isProd ? (
-
+ {assets?.css.map((css, i) => (
+
+ ))}
) : (
diff --git a/app/src/ui/routes/auth/auth.roles.edit.$role.tsx b/app/src/ui/routes/auth/auth.roles.edit.$role.tsx
index f4195e0..7ee4ea6 100644
--- a/app/src/ui/routes/auth/auth.roles.edit.$role.tsx
+++ b/app/src/ui/routes/auth/auth.roles.edit.$role.tsx
@@ -68,11 +68,11 @@ function AuthRolesEditInternal({ params }) {
>
- !readonly && (
-
- )
+ {!readonly && (
+
+ )}
>
}
className="pl-3"
diff --git a/app/src/ui/routes/data/data.$entity.index.tsx b/app/src/ui/routes/data/data.$entity.index.tsx
index 3e90802..ff3c057 100644
--- a/app/src/ui/routes/data/data.$entity.index.tsx
+++ b/app/src/ui/routes/data/data.$entity.index.tsx
@@ -169,8 +169,6 @@ function EntityCreateButton({ entity }: { entity: Entity }) {
media: b.app.config.media.entity_name,
};
if (system.users === entity.name) {
- if (b.readonly) return null;
-
return (