From 225ab19ef14592a1d077ccfa77228d83368133ad Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 3 Oct 2022 12:46:56 +0200 Subject: [PATCH] Remove first char upper case for realm (#3412) --- .../src/components/realm-selector/RealmSelector.tsx | 9 ++++----- apps/admin-ui/src/dashboard/Dashboard.tsx | 4 +--- apps/admin-ui/src/realm-settings/RealmSettingsTabs.tsx | 8 ++------ 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/apps/admin-ui/src/components/realm-selector/RealmSelector.tsx b/apps/admin-ui/src/components/realm-selector/RealmSelector.tsx index c0901b9819..a53c2efde9 100644 --- a/apps/admin-ui/src/components/realm-selector/RealmSelector.tsx +++ b/apps/admin-ui/src/components/realm-selector/RealmSelector.tsx @@ -20,7 +20,6 @@ import { useRealms } from "../../context/RealmsContext"; import { useWhoAmI } from "../../context/whoami/WhoAmI"; import { toDashboard } from "../../dashboard/routes/Dashboard"; import { toAddRealm } from "../../realm/routes/AddRealm"; -import { toUpperCase } from "../../util"; import { RecentUsed } from "./recent-used"; import "./realm-selector.css"; @@ -59,7 +58,7 @@ export const RealmSelector = () => { const RealmText = ({ value }: { value: string }) => ( - {toUpperCase(value)} + {value} {value === realm && } ); @@ -112,9 +111,9 @@ export const RealmSelector = () => { {realms.length > 5 && ( setOpen(!open)} onSelect={(_, r) => { let element: ReactElement; @@ -159,7 +158,7 @@ export const RealmSelector = () => { onToggle={() => setOpen(!open)} className="keycloak__realm_selector_dropdown__toggle" > - {toUpperCase(realm)} + {realm} } dropdownItems={[...dropdownItems, addRealmComponent]} diff --git a/apps/admin-ui/src/dashboard/Dashboard.tsx b/apps/admin-ui/src/dashboard/Dashboard.tsx index 5d14426899..3a89d66156 100644 --- a/apps/admin-ui/src/dashboard/Dashboard.tsx +++ b/apps/admin-ui/src/dashboard/Dashboard.tsx @@ -128,9 +128,7 @@ const Dashboard = () => { <> - - {t("realmName", { name: toUpperCase(realm) })} - + {t("realmName", { name: realm })} Admin UI version diff --git a/apps/admin-ui/src/realm-settings/RealmSettingsTabs.tsx b/apps/admin-ui/src/realm-settings/RealmSettingsTabs.tsx index 392f2653a2..97f8615e07 100644 --- a/apps/admin-ui/src/realm-settings/RealmSettingsTabs.tsx +++ b/apps/admin-ui/src/realm-settings/RealmSettingsTabs.tsx @@ -26,11 +26,7 @@ import { useRealms } from "../context/RealmsContext"; import { ViewHeader } from "../components/view-header/ViewHeader"; import { useAdminClient } from "../context/auth/AdminClient"; import { useAlerts } from "../components/alert/Alerts"; -import { - convertFormValuesToObject, - convertToFormValues, - toUpperCase, -} from "../util"; +import { convertFormValuesToObject, convertToFormValues } from "../util"; import { RealmSettingsEmailTab } from "./EmailTab"; import { EventsTab } from "./event-config/EventsTab"; @@ -120,7 +116,7 @@ const RealmSettingsHeader = ({ onClose={() => setPartialExportOpen(false)} />