Remove first char upper case for realm (#3412)
This commit is contained in:
parent
249c6bbf02
commit
225ab19ef1
3 changed files with 7 additions and 14 deletions
|
@ -20,7 +20,6 @@ import { useRealms } from "../../context/RealmsContext";
|
||||||
import { useWhoAmI } from "../../context/whoami/WhoAmI";
|
import { useWhoAmI } from "../../context/whoami/WhoAmI";
|
||||||
import { toDashboard } from "../../dashboard/routes/Dashboard";
|
import { toDashboard } from "../../dashboard/routes/Dashboard";
|
||||||
import { toAddRealm } from "../../realm/routes/AddRealm";
|
import { toAddRealm } from "../../realm/routes/AddRealm";
|
||||||
import { toUpperCase } from "../../util";
|
|
||||||
import { RecentUsed } from "./recent-used";
|
import { RecentUsed } from "./recent-used";
|
||||||
|
|
||||||
import "./realm-selector.css";
|
import "./realm-selector.css";
|
||||||
|
@ -59,7 +58,7 @@ export const RealmSelector = () => {
|
||||||
|
|
||||||
const RealmText = ({ value }: { value: string }) => (
|
const RealmText = ({ value }: { value: string }) => (
|
||||||
<Split className="keycloak__realm_selector__list-item-split">
|
<Split className="keycloak__realm_selector__list-item-split">
|
||||||
<SplitItem isFilled>{toUpperCase(value)}</SplitItem>
|
<SplitItem isFilled>{value}</SplitItem>
|
||||||
<SplitItem>{value === realm && <CheckIcon />}</SplitItem>
|
<SplitItem>{value === realm && <CheckIcon />}</SplitItem>
|
||||||
</Split>
|
</Split>
|
||||||
);
|
);
|
||||||
|
@ -112,9 +111,9 @@ export const RealmSelector = () => {
|
||||||
{realms.length > 5 && (
|
{realms.length > 5 && (
|
||||||
<ContextSelector
|
<ContextSelector
|
||||||
data-testid="realmSelector"
|
data-testid="realmSelector"
|
||||||
toggleText={toUpperCase(realm)}
|
toggleText={realm}
|
||||||
isOpen={open}
|
isOpen={open}
|
||||||
screenReaderLabel={toUpperCase(realm)}
|
screenReaderLabel={realm}
|
||||||
onToggle={() => setOpen(!open)}
|
onToggle={() => setOpen(!open)}
|
||||||
onSelect={(_, r) => {
|
onSelect={(_, r) => {
|
||||||
let element: ReactElement;
|
let element: ReactElement;
|
||||||
|
@ -159,7 +158,7 @@ export const RealmSelector = () => {
|
||||||
onToggle={() => setOpen(!open)}
|
onToggle={() => setOpen(!open)}
|
||||||
className="keycloak__realm_selector_dropdown__toggle"
|
className="keycloak__realm_selector_dropdown__toggle"
|
||||||
>
|
>
|
||||||
{toUpperCase(realm)}
|
{realm}
|
||||||
</DropdownToggle>
|
</DropdownToggle>
|
||||||
}
|
}
|
||||||
dropdownItems={[...dropdownItems, addRealmComponent]}
|
dropdownItems={[...dropdownItems, addRealmComponent]}
|
||||||
|
|
|
@ -128,9 +128,7 @@ const Dashboard = () => {
|
||||||
<>
|
<>
|
||||||
<PageSection variant="light">
|
<PageSection variant="light">
|
||||||
<TextContent className="pf-u-mr-sm">
|
<TextContent className="pf-u-mr-sm">
|
||||||
<Text component="h1">
|
<Text component="h1">{t("realmName", { name: realm })}</Text>
|
||||||
{t("realmName", { name: toUpperCase(realm) })}
|
|
||||||
</Text>
|
|
||||||
<Text>
|
<Text>
|
||||||
<Trans t={t} i18nKey="adminUiVersion">
|
<Trans t={t} i18nKey="adminUiVersion">
|
||||||
<strong>Admin UI version</strong>
|
<strong>Admin UI version</strong>
|
||||||
|
|
|
@ -26,11 +26,7 @@ import { useRealms } from "../context/RealmsContext";
|
||||||
import { ViewHeader } from "../components/view-header/ViewHeader";
|
import { ViewHeader } from "../components/view-header/ViewHeader";
|
||||||
import { useAdminClient } from "../context/auth/AdminClient";
|
import { useAdminClient } from "../context/auth/AdminClient";
|
||||||
import { useAlerts } from "../components/alert/Alerts";
|
import { useAlerts } from "../components/alert/Alerts";
|
||||||
import {
|
import { convertFormValuesToObject, convertToFormValues } from "../util";
|
||||||
convertFormValuesToObject,
|
|
||||||
convertToFormValues,
|
|
||||||
toUpperCase,
|
|
||||||
} from "../util";
|
|
||||||
|
|
||||||
import { RealmSettingsEmailTab } from "./EmailTab";
|
import { RealmSettingsEmailTab } from "./EmailTab";
|
||||||
import { EventsTab } from "./event-config/EventsTab";
|
import { EventsTab } from "./event-config/EventsTab";
|
||||||
|
@ -120,7 +116,7 @@ const RealmSettingsHeader = ({
|
||||||
onClose={() => setPartialExportOpen(false)}
|
onClose={() => setPartialExportOpen(false)}
|
||||||
/>
|
/>
|
||||||
<ViewHeader
|
<ViewHeader
|
||||||
titleKey={toUpperCase(realmName)}
|
titleKey={realmName}
|
||||||
subKey="realm-settings:realmSettingsExplain"
|
subKey="realm-settings:realmSettingsExplain"
|
||||||
helpUrl={helpUrls.realmSettingsUrl}
|
helpUrl={helpUrls.realmSettingsUrl}
|
||||||
divider={false}
|
divider={false}
|
||||||
|
|
Loading…
Reference in a new issue