2021-07-23 16:29:10 +00:00
|
|
|
import type { LocationDescriptorObject } from "history";
|
2021-10-29 16:11:06 +00:00
|
|
|
import { lazy } from "react";
|
2021-07-23 16:29:10 +00:00
|
|
|
import { generatePath } from "react-router-dom";
|
|
|
|
import type { RouteDef } from "../../route-config";
|
|
|
|
|
|
|
|
export type RealmSettingsTab =
|
|
|
|
| "login"
|
|
|
|
| "email"
|
|
|
|
| "themes"
|
|
|
|
| "keys"
|
|
|
|
| "events"
|
2022-01-14 10:05:50 +00:00
|
|
|
| "localization"
|
2021-07-23 16:29:10 +00:00
|
|
|
| "securityDefences"
|
2021-08-09 19:28:24 +00:00
|
|
|
| "sessions"
|
2021-09-09 10:45:19 +00:00
|
|
|
| "tokens"
|
2021-11-12 15:04:05 +00:00
|
|
|
| "clientPolicies"
|
2021-11-16 11:10:10 +00:00
|
|
|
| "userProfile"
|
|
|
|
| "userRegistration";
|
2021-07-23 16:29:10 +00:00
|
|
|
|
|
|
|
export type RealmSettingsParams = {
|
|
|
|
realm: string;
|
|
|
|
tab?: RealmSettingsTab;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const RealmSettingsRoute: RouteDef = {
|
|
|
|
path: "/:realm/realm-settings/:tab?",
|
2021-10-29 16:11:06 +00:00
|
|
|
component: lazy(() => import("../RealmSettingsSection")),
|
2021-07-23 16:29:10 +00:00
|
|
|
breadcrumb: (t) => t("realmSettings"),
|
|
|
|
access: "view-realm",
|
|
|
|
};
|
|
|
|
|
|
|
|
export const toRealmSettings = (
|
|
|
|
params: RealmSettingsParams
|
|
|
|
): LocationDescriptorObject => ({
|
|
|
|
pathname: generatePath(RealmSettingsRoute.path, params),
|
|
|
|
});
|