parent
48e13b7204
commit
c656d6acee
2 changed files with 31 additions and 14 deletions
|
@ -1,5 +1,6 @@
|
|||
import React, { useState, useContext } from "react";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {
|
||||
Nav,
|
||||
NavItem,
|
||||
|
@ -13,6 +14,7 @@ import { HttpClientContext } from "./http-service/HttpClientContext";
|
|||
import { RealmRepresentation } from "./realm/models/Realm";
|
||||
|
||||
export const PageNav: React.FunctionComponent = () => {
|
||||
const { t } = useTranslation("common");
|
||||
const httpClient = useContext(HttpClientContext)!;
|
||||
const realmLoader = async () => {
|
||||
const response = await httpClient.doGet<RealmRepresentation[]>(
|
||||
|
@ -48,7 +50,7 @@ export const PageNav: React.FunctionComponent = () => {
|
|||
to={"/" + path}
|
||||
isActive={activeItem === "/" + path}
|
||||
>
|
||||
{title}
|
||||
{t(title)}
|
||||
</NavItem>
|
||||
);
|
||||
};
|
||||
|
@ -64,21 +66,21 @@ export const PageNav: React.FunctionComponent = () => {
|
|||
<RealmSelector realmList={realmList || []} />
|
||||
</NavItem>
|
||||
</NavList>
|
||||
<NavGroup title="Manage">
|
||||
{makeNavItem("Clients", "clients")}
|
||||
{makeNavItem("Client Scopes", "client-scopes")}
|
||||
{makeNavItem("Realm Roles", "realm-roles")}
|
||||
{makeNavItem("Users", "users")}
|
||||
{makeNavItem("Groups", "groups")}
|
||||
{makeNavItem("Sessions", "sessions")}
|
||||
{makeNavItem("Events", "events")}
|
||||
<NavGroup title={t("manage")}>
|
||||
{makeNavItem("clients", "clients")}
|
||||
{makeNavItem("clientScopes", "client-scopes")}
|
||||
{makeNavItem("realmRoles", "realm-roles")}
|
||||
{makeNavItem("users", "users")}
|
||||
{makeNavItem("groups", "groups")}
|
||||
{makeNavItem("sessions", "sessions")}
|
||||
{makeNavItem("events", "events")}
|
||||
</NavGroup>
|
||||
|
||||
<NavGroup title="Configure">
|
||||
{makeNavItem("Realm settings", "realm-settings")}
|
||||
{makeNavItem("Authentication", "authentication")}
|
||||
{makeNavItem("Identity providers", "identity-providers")}
|
||||
{makeNavItem("User federation", "user-federation")}
|
||||
<NavGroup title={t("configure")}>
|
||||
{makeNavItem("realmSettings", "realm-settings")}
|
||||
{makeNavItem("authentication", "authentication")}
|
||||
{makeNavItem("identityProviders", "identity-providers")}
|
||||
{makeNavItem("userFederation", "user-federation")}
|
||||
</NavGroup>
|
||||
</Nav>
|
||||
}
|
||||
|
|
|
@ -21,6 +21,21 @@
|
|||
"documentation": "Documentation",
|
||||
"enableHelpMode": "Enable help mode",
|
||||
|
||||
"manage": "Manage",
|
||||
"clients": "Clients",
|
||||
"clientScopes": "Client scopes",
|
||||
"realmRoles": "Realm roles",
|
||||
"users": "Users",
|
||||
"groups": "Groups",
|
||||
"sessions": "Sessions",
|
||||
"events": "Events",
|
||||
|
||||
"configure": "Configure",
|
||||
"realmSettings": "Realm settings",
|
||||
"authentication": "Authentication",
|
||||
"identityProviders": "Identity providers",
|
||||
"userFederation": "User federation",
|
||||
|
||||
"required": "Required field"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue