Retire shell-context and render the dashboard from ctx.chrome
CI / full-gate (push) Successful in 3m18s

This commit is contained in:
2026-10-31 08:37:45 +01:00
parent de4eb7d9ee
commit 352de29013
6 changed files with 45 additions and 20 deletions
+1 -2
View File
@@ -8,7 +8,6 @@ import { buildPluginChrome, type PageChrome } from "../ui/chrome.ts";
import { buildContext, type RequestContext, type User } from "./context.ts";
import { csrfCookie, ensureCsrfToken, verifyCsrfRequest } from "../auth/csrf.ts";
import type { Denylist } from "../auth/denylist.ts";
import { buildDashboardModel } from "../ui/dashboard.ts";
import { PLUGINS_DIR } from "../plugin-host/discovery.ts";
import { GuardError, loginRedirect } from "../auth/guards.ts";
import { ENGLISH_I18N } from "../i18n/english.ts";
@@ -168,7 +167,7 @@ export function createApp(options: AppOptions = {}): Server {
await sendResult(ctx.res, result, pluginViewsFor(pluginCtx, dashboardPlugin.id), pluginCtx.localeHref);
return null;
}
return { data: { model: buildDashboardModel({ csrfToken: csrf.token, menu, user: ctx.user, nav: ctx.chrome.nav, t: ctx.t }) }, view: "index" };
return { data: { chrome: ctx.chrome }, view: "index" };
};
// The internal route table, matched after plugin routes: the auth/OAuth2 group (src/auth/