diff --git a/src/dashboard/Dashboard.tsx b/src/dashboard/Dashboard.tsx index d75eedf95a..cbebe8a64c 100644 --- a/src/dashboard/Dashboard.tsx +++ b/src/dashboard/Dashboard.tsx @@ -21,8 +21,8 @@ import { Title, } from "@patternfly/react-core"; import React from "react"; -import { useTranslation } from "react-i18next"; -import _ from "lodash"; +import { Trans, useTranslation } from "react-i18next"; +import { xor } from "lodash"; import { useRealm } from "../context/realm-context/RealmContext"; import { useServerInfo } from "../context/server-info/ServerInfoProvider"; @@ -60,7 +60,7 @@ const Dashboard = () => { const { realm } = useRealm(); const serverInfo = useServerInfo(); - const enabledFeatures = _.xor( + const enabledFeatures = xor( serverInfo.profileInfo?.disabledFeatures, serverInfo.profileInfo?.experimentalFeatures, serverInfo.profileInfo?.previewFeatures @@ -78,7 +78,15 @@ const Dashboard = () => { <> - {toUpperCase(realm)} realm + + {t("realmName", { name: toUpperCase(realm) })} + + + + Admin UI version + {{ version: environment.commitHash }} + + @@ -160,9 +168,6 @@ const Dashboard = () => { - - {t("adminUiVersion", { version: environment.commitHash })} - ); diff --git a/src/dashboard/messages.ts b/src/dashboard/messages.ts index 11ece0c7a5..c89926805c 100644 --- a/src/dashboard/messages.ts +++ b/src/dashboard/messages.ts @@ -1,5 +1,6 @@ export default { dashboard: { + realmName: "{{name}} realm", welcome: "Welcome to", introduction: "If you want to leave this page and mange this realm, please click the corresponding menu items in the left navigation bar.", @@ -13,6 +14,6 @@ export default { infoEnabledFeatures: "Something about what enabled features are.", infoDisabledFeatures: "Something about what disabled features are.", disabledFeatures: "Disabled features", - adminUiVersion: "Admin UI version: {{version}}", + adminUiVersion: '<0 class="pf-u-mr-md">Admin UI version{{version}}', }, };