diff --git a/packages/dashboard-frontend/src/Layout/Header/Tools/AboutMenu/Modal.tsx b/packages/dashboard-frontend/src/Layout/Header/Tools/AboutMenu/Modal.tsx index e391c81f8..c8194e8a1 100644 --- a/packages/dashboard-frontend/src/Layout/Header/Tools/AboutMenu/Modal.tsx +++ b/packages/dashboard-frontend/src/Layout/Header/Tools/AboutMenu/Modal.tsx @@ -29,9 +29,9 @@ type Props = { }; export class AboutModal extends React.PureComponent { - private browserVersion: string | undefined | null; - private browserOS: string | undefined | null; - private browserName: string | undefined; + private readonly browserVersion: string | undefined | null; + private readonly browserOS: string | undefined | null; + private readonly browserName: string | undefined; constructor(props: Props) { super(props); diff --git a/packages/dashboard-frontend/src/Layout/Header/Tools/AboutMenu/index.tsx b/packages/dashboard-frontend/src/Layout/Header/Tools/AboutMenu/index.tsx index 96118b4c1..e3872fb52 100644 --- a/packages/dashboard-frontend/src/Layout/Header/Tools/AboutMenu/index.tsx +++ b/packages/dashboard-frontend/src/Layout/Header/Tools/AboutMenu/index.tsx @@ -23,6 +23,7 @@ import { BrandingData } from '../../../../services/bootstrap/branding.constant'; type Props = { branding: BrandingData; username: string; + dashboardLogo?: { base64data: string; mediatype: string }; }; type State = { isLauncherOpen: boolean; @@ -88,11 +89,16 @@ export class AboutMenu extends React.PureComponent { } public render(): React.ReactElement { - const { username } = this.props; + const { username, dashboardLogo } = this.props; const { isLauncherOpen, isModalOpen } = this.state; const { logoFile, name, productVersion } = this.props.branding; + const logoSrc = + dashboardLogo !== undefined + ? `data:${dashboardLogo.mediatype};base64,${dashboardLogo.base64data}` + : logoFile; + return ( <> { isOpen={isModalOpen} closeModal={() => this.closeModal()} username={username} - logo={logoFile} + logo={logoSrc} productName={name} serverVersion={productVersion} /> diff --git a/packages/dashboard-frontend/src/Layout/Header/Tools/index.tsx b/packages/dashboard-frontend/src/Layout/Header/Tools/index.tsx index 607b03394..658f4b379 100644 --- a/packages/dashboard-frontend/src/Layout/Header/Tools/index.tsx +++ b/packages/dashboard-frontend/src/Layout/Header/Tools/index.tsx @@ -27,6 +27,7 @@ import { AboutMenu } from './AboutMenu'; import UserMenu from './UserMenu'; import { ApplicationsMenu } from './ApplicationsMenu'; import { selectApplications } from '../../../store/ClusterInfo/selectors'; +import { selectDashboardLogo } from '../../../store/ServerConfig/selectors'; type Props = MappedProps & { history: History; @@ -50,7 +51,11 @@ export class HeaderTools extends React.PureComponent { {applications.length !== 0 && } - + {isUserAuthenticated && ( @@ -73,6 +78,7 @@ export class HeaderTools extends React.PureComponent { const mapStateToProps = (state: AppState) => ({ userProfile: selectUserProfile(state), branding: selectBranding(state), + dashboardLogo: selectDashboardLogo(state), applications: selectApplications(state), });