This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/web/src/routesUser.ts
Jens Langhammer c72d56d02d web: use full import paths for dynamic imports
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
2022-07-01 16:56:23 +02:00

16 lines
578 B
TypeScript

import { html } from "lit";
import { Route } from "./elements/router/Route";
import "./user/LibraryPage";
export const ROUTES: Route[] = [
// Prevent infinite Shell loops
new Route(new RegExp("^/$")).redirect("/library"),
new Route(new RegExp("^#.*")).redirect("/library"),
new Route(new RegExp("^/library$"), async () => html`<ak-library></ak-library>`),
new Route(new RegExp("^/settings$"), async () => {
await import("@goauthentik/web/user/user-settings/UserSettingsPage");
return html`<ak-user-settings></ak-user-settings>`;
}),
];