diff --git a/js/apps/admin-ui/cypress/support/pages/admin-ui/Masthead.ts b/js/apps/admin-ui/cypress/support/pages/admin-ui/Masthead.ts
index ca8bed4779..2f5112d03d 100644
--- a/js/apps/admin-ui/cypress/support/pages/admin-ui/Masthead.ts
+++ b/js/apps/admin-ui/cypress/support/pages/admin-ui/Masthead.ts
@@ -11,7 +11,7 @@ export default class Masthead extends CommonElements {
#globalAlerts = "global-alerts";
#documentationLink = "#link";
#backToAdminConsoleLink = "referrer-link";
- #userDrpdwnItem = ".pf-v5-c-dropdown__menu-item";
+ #userDrpdwnItem = ".pf-v5-c-menu__item";
#getAlertsContainer() {
return cy.findByTestId(this.#globalAlerts);
diff --git a/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties b/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties
index 835fba8c62..ef74502196 100644
--- a/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties
+++ b/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties
@@ -3121,4 +3121,6 @@ parRequestUriLifespan=Lifetime of the Request URI for Pushed Authorization Reque
parRequestUriLifespanHelp=Number that represents the lifetime of the request URI. The default value is 1 minute.
identityBrokeringLink=Identity brokering link
searchClientRegistration=Search for policy
-importFileHelp=File to import a key
\ No newline at end of file
+importFileHelp=File to import a key
+logo=Logo
+avatarImage=Avatar image
\ No newline at end of file
diff --git a/js/apps/admin-ui/src/PageHeader.tsx b/js/apps/admin-ui/src/PageHeader.tsx
index 6b7bf05cad..afc3ced7e8 100644
--- a/js/apps/admin-ui/src/PageHeader.tsx
+++ b/js/apps/admin-ui/src/PageHeader.tsx
@@ -1,19 +1,23 @@
-import { Avatar, Brand } from "@patternfly/react-core";
import {
+ Avatar,
+ Divider,
Dropdown,
DropdownItem,
- DropdownSeparator,
- DropdownToggle,
- KebabToggle,
- PageHeader,
- PageHeaderTools,
- PageHeaderToolsGroup,
- PageHeaderToolsItem,
-} from "@patternfly/react-core/deprecated";
-import { HelpIcon } from "@patternfly/react-icons";
-import { ReactNode, useState } from "react";
+ DropdownList,
+ Masthead,
+ MastheadBrand,
+ MastheadContent,
+ MastheadToggle,
+ MenuToggle,
+ PageToggleButton,
+ Toolbar,
+ ToolbarContent,
+ ToolbarItem,
+} from "@patternfly/react-core";
+import { BarsIcon, EllipsisVIcon, HelpIcon } from "@patternfly/react-icons";
+import { useState } from "react";
import { useTranslation } from "react-i18next";
-import { Link } from "react-router-dom";
+import { Link, useHref } from "react-router-dom";
import { useHelp } from "ui-shared";
import { HelpHeader } from "./components/help-enabler/HelpHeader";
@@ -56,12 +60,7 @@ const ServerInfoDropdownItem = () => {
return (
(
-
- )) as unknown as ReactNode
- }
+ component={(props) => }
>
{t("realmInfo")}
@@ -86,14 +85,14 @@ const kebabDropdownItems = [
,
,
,
- ,
+ ,
,
];
const userDropdownItems = [
,
,
- ,
+ ,
,
];
@@ -102,13 +101,23 @@ const KebabDropdown = () => {
return (
setDropdownOpen(val)} />}
+ onOpenChange={(isOpen) => setDropdownOpen(isOpen)}
+ toggle={(ref) => (
+ setDropdownOpen(!isDropdownOpen)}
+ isExpanded={isDropdownOpen}
+ >
+
+
+ )}
isOpen={isDropdownOpen}
- dropdownItems={kebabDropdownItems}
- />
+ >
+ {kebabDropdownItems}
+
);
};
@@ -119,82 +128,90 @@ const UserDropdown = () => {
return (
setDropdownOpen(val)}>
+ onOpenChange={(isOpen) => setDropdownOpen(isOpen)}
+ toggle={(ref) => (
+ setDropdownOpen(!isDropdownOpen)}
+ >
{whoAmI.getDisplayName()}
-
- }
- dropdownItems={userDropdownItems}
- />
+
+ )}
+ >
+ {userDropdownItems}
+
);
};
export const Header = () => {
+ const { t } = useTranslation();
const { realm } = useRealm();
- const headerTools = () => {
- const picture = keycloak.tokenParsed?.picture;
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- };
-
+ const picture = keycloak.tokenParsed?.picture;
const logo = environment.logo ? environment.logo : "/logo.svg";
- const logoUrl = environment.logoUrl
- ? environment.logoUrl
- : toDashboard({ realm });
+ const url = useHref(toDashboard({ realm }));
+ const logoUrl = environment.logoUrl ? environment.logoUrl : url;
return (
-
-
-
- }
- logoComponent="div"
- headerTools={headerTools()}
- />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);
};