web: Convert the application create-wizard link to a path URL.

This commit is contained in:
Teffen Ellis
2026-08-11 17:46:29 +01:00
committed by Teffen Ellis
parent 1868aaf248
commit 9c8a5b0266
3 changed files with 14 additions and 10 deletions

View File

@@ -18,7 +18,7 @@ import { AKElement } from "#elements/Base";
import type { QuickAction } from "#elements/cards/QuickActionsCard";
import { WithLicenseSummary } from "#elements/mixins/license";
import { WithSession } from "#elements/mixins/session";
import { paramURL } from "#elements/router/RouterOutlet";
import { toAdminInterface } from "#elements/router/core/interfaces";
import { setPageDetails } from "#components/ak-page-navbar";
@@ -60,10 +60,13 @@ export class AdminOverviewPage extends AdminOverviewBase {
];
quickActions: QuickAction[] = [
[msg("Create a new application"), paramURL("/core/applications", { createWizard: true })],
[msg("Check the logs"), paramURL("/events/log")],
[
msg("Create a new application"),
toAdminInterface("core/applications", { "create-wizard": "application" }),
],
[msg("Check the logs"), toAdminInterface("events/log")],
[msg("Explore integrations"), "https://integrations.goauthentik.io/", true],
[msg("Manage users"), paramURL("/identity/users")],
[msg("Manage users"), toAdminInterface("identity/users")],
[msg("Check the release notes"), import.meta.env.AK_DOCS_RELEASE_NOTES_URL, true],
];
@@ -82,7 +85,7 @@ export class AdminOverviewPage extends AdminOverviewBase {
<ak-aggregate-card
icon="pf-icon pf-icon-zone"
label=${msg("Outpost status")}
headerLink="#/outpost/outposts"
headerLink=${toAdminInterface("outpost/outposts")}
>
<ak-admin-status-chart-outpost></ak-admin-status-chart-outpost>
</ak-aggregate-card>

View File

@@ -19,7 +19,8 @@ import { aki } from "#common/api/client";
import { ModelForm } from "#elements/forms/ModelForm";
import { WithCapabilitiesConfig } from "#elements/mixins/capabilities";
import { navigate } from "#elements/router/RouterOutlet";
import { toAdminInterface } from "#elements/router/core/interfaces";
import { navigate } from "#elements/router/core/navigation";
import { ifPresent } from "#elements/utils/attributes";
import { policyEngineModes } from "#admin/policies/PolicyEngineModes";
@@ -86,7 +87,7 @@ export class ApplicationForm extends WithCapabilitiesConfig(ModelForm<Applicatio
if (currentSlug && currentSlug !== nextSlug) {
this.instancePk = nextSlug;
navigate(`/core/applications/${nextSlug}`);
navigate(toAdminInterface(`core/applications/${nextSlug}`));
}
return app;

View File

@@ -12,7 +12,7 @@ import { aki } from "#common/api/client";
import { IconEditButton } from "#elements/dialogs";
import { WithBrandConfig } from "#elements/mixins/branding";
import { getURLParam } from "#elements/router/RouteMatch";
import { getSearchParam } from "#elements/router/core/search-params";
import { PaginatedResponse, TableColumn } from "#elements/table/Table";
import { TablePage } from "#elements/table/TablePage";
import { SlottedTemplateResult } from "#elements/types";
@@ -71,9 +71,9 @@ export class ApplicationListPage extends WithBrandConfig(TablePage<Application>)
public override firstUpdated(changed: PropertyValues<this>): void {
super.firstUpdated(changed);
if (getURLParam("createWizard", false)) {
if (getSearchParam<string>("create-wizard", "") === "application") {
AKApplicationWizard.showModal();
} else if (getURLParam("createForm", false)) {
} else if (getSearchParam<string>("create-form", "") === "application") {
ApplicationForm.showModal();
}
}