Fixed #480 In Secure-mode, "Need help" icon shows User profile image (#490)

This commit is contained in:
Sachin Chaurasiya 2021-09-14 19:17:35 +05:30 committed by GitHub
parent cb5e2196be
commit 4344a1ea19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 24 deletions

View File

@ -206,7 +206,7 @@ const Appbar: React.FC = (): JSX.Element => {
icon={ icon={
<SVGIcons <SVGIcons
alt="Doc icon" alt="Doc icon"
className="tw-align-middle tw-mr-1" className="tw-align-middle tw-mt-0.5 tw-mr-1"
icon={Icons.HELP_CIRCLE} icon={Icons.HELP_CIRCLE}
width="16" width="16"
/> />
@ -226,14 +226,25 @@ const Appbar: React.FC = (): JSX.Element => {
}, },
]} ]}
icon={ icon={
<IconDefaultUserProfile <>
className="" {appState.userDetails.profile?.images.image512 ? (
style={{ <div className="profile-image">
height: '24px', <img
width: '24px', alt="user"
borderRadius: '50%', src={appState.userDetails.profile.images.image512}
}} />
/> </div>
) : (
<IconDefaultUserProfile
className=""
style={{
height: '24px',
width: '24px',
borderRadius: '50%',
}}
/>
)}
</>
} }
label="" label=""
type="link" type="link"

View File

@ -17,7 +17,6 @@
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React, { useState } from 'react'; import React, { useState } from 'react';
import AppState from '../../AppState';
import { activeLink, normalLink } from '../../utils/styleconstant'; import { activeLink, normalLink } from '../../utils/styleconstant';
import { dropdownIcon as DropdownIcon } from '../../utils/svgconstant'; import { dropdownIcon as DropdownIcon } from '../../utils/svgconstant';
import AnchorDropDownList from './AnchorDropDownList'; import AnchorDropDownList from './AnchorDropDownList';
@ -102,20 +101,7 @@ const DropDown: React.FC<DropDownProp> = ({
</> </>
) : ( ) : (
<> <>
{Icon && ( {Icon && Icon}
<div className="">
{AppState.userDetails.profile?.images.image512 ? (
<div className="profile-image">
<img
alt="user"
src={AppState.userDetails.profile.images.image512}
/>
</div>
) : (
Icon
)}
</div>
)}
{label && ( {label && (
<p <p
className="hover:tw-underline" className="hover:tw-underline"