From 0804b5e6c524157de6e320b59e2a4c667cace659 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 29 Mar 2021 15:53:56 +0200 Subject: [PATCH] web: shrink flow build by not including router Signed-off-by: Jens Langhammer --- web/src/constants.ts | 1 + web/src/elements/router/RouterOutlet.ts | 4 +--- web/src/flows/FlowExecutor.ts | 2 +- web/src/interfaces/AdminInterface.ts | 3 --- web/src/routes.ts | 1 - 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/web/src/constants.ts b/web/src/constants.ts index 04f480d9c..e21c53ad4 100644 --- a/web/src/constants.ts +++ b/web/src/constants.ts @@ -9,3 +9,4 @@ export const EVENT_REFRESH = "ak-refresh"; export const EVENT_NOTIFICATION_TOGGLE = "ak-notification-toggle"; export const EVENT_SIDEBAR_TOGGLE = "ak-sidebar-toggle"; export const EVENT_API_DRAWER_REFRESH = "ak-api-drawer-refresh"; +export const TITLE_SUFFIX = "authentik"; diff --git a/web/src/elements/router/RouterOutlet.ts b/web/src/elements/router/RouterOutlet.ts index d702b389e..545117762 100644 --- a/web/src/elements/router/RouterOutlet.ts +++ b/web/src/elements/router/RouterOutlet.ts @@ -4,11 +4,9 @@ import { ROUTES } from "../../routes"; import { RouteMatch } from "./RouteMatch"; import AKGlobal from "../../authentik.css"; -import "../../pages/generic/SiteShell"; import "./Router404"; import { Page } from "../Page"; - -export const TITLE_SUFFIX = "authentik"; +import { TITLE_SUFFIX } from "../../constants"; @customElement("ak-router-outlet") export class RouterOutlet extends LitElement { diff --git a/web/src/flows/FlowExecutor.ts b/web/src/flows/FlowExecutor.ts index 10297e2b4..5e397f922 100644 --- a/web/src/flows/FlowExecutor.ts +++ b/web/src/flows/FlowExecutor.ts @@ -39,9 +39,9 @@ import { Challenge, ChallengeTypeEnum, Config, FlowsApi, RootApi } from "authent import { DEFAULT_CONFIG } from "../api/Config"; import { ifDefined } from "lit-html/directives/if-defined"; import { until } from "lit-html/directives/until"; -import { TITLE_SUFFIX } from "../elements/router/RouterOutlet"; import { AccessDeniedChallenge } from "./access_denied/FlowAccessDenied"; import { SpinnerSize } from "../elements/Spinner"; +import { TITLE_SUFFIX } from "../constants"; @customElement("ak-flow-executor") export class FlowExecutor extends LitElement implements StageHost { diff --git a/web/src/interfaces/AdminInterface.ts b/web/src/interfaces/AdminInterface.ts index 0418c459e..b710f7320 100644 --- a/web/src/interfaces/AdminInterface.ts +++ b/web/src/interfaces/AdminInterface.ts @@ -1,8 +1,5 @@ import "construct-style-sheets-polyfill"; -// Elements that are used by SiteShell pages -// And can't dynamically be imported -import "../elements/CodeMirror"; import "../elements/messages/MessageContainer"; import { customElement } from "lit-element"; import { me } from "../api/Users"; diff --git a/web/src/routes.ts b/web/src/routes.ts index ef93147b2..9e716cd90 100644 --- a/web/src/routes.ts +++ b/web/src/routes.ts @@ -11,7 +11,6 @@ import "./pages/events/RuleListPage"; import "./pages/events/TransportListPage"; import "./pages/flows/FlowListPage"; import "./pages/flows/FlowViewPage"; -import "./pages/generic/SiteShell"; import "./pages/groups/GroupListPage"; import "./pages/LibraryPage"; import "./pages/outposts/OutpostListPage";