Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1156 | members summary | added icon colors
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Jan 10, 2022
1 parent d203ff3 commit 396b67a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
11 changes: 5 additions & 6 deletions src/components/orgs/Members.jsx
Expand Up @@ -6,7 +6,7 @@ import {
AdminPanelSettings as AdminIcon
} from '@mui/icons-material';
import { map, chunk, isEmpty } from 'lodash';
import { DARKGRAY } from '../../common/constants'
import { GREEN, ORANGE } from '../../common/constants'
import { getUserInitials } from '../../common/utils';
import HtmlToolTipRaw from '../common/HtmlToolTipRaw';

Expand Down Expand Up @@ -36,7 +36,7 @@ const IdentityBadge = ({member, size}) => {
<Badge
overlap="circular"
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
badgeContent={<AdminIcon style={{color: DARKGRAY}} />}
badgeContent={<AdminIcon style={{color: ORANGE}} />}
>
<Identity member={member} size={size} />
</Badge> :
Expand Down Expand Up @@ -69,7 +69,7 @@ const Info = ({ member }) => {
<div className='col-xs-12 no-side-padding flex-vertical-center' style={{fontSize: '14px'}}>
<Link to={`${member.url}sources`} className='no-anchor-styles flex-vertical-center'>
<React.Fragment>
<SourceIcon color='disabled' style={{marginRight: '5px', width: '18px'}} />
<SourceIcon style={{marginRight: '5px', width: '18px', color: GREEN}} />
<span>{`Owner of ${member.sources} public sources`}</span>
</React.Fragment>
</Link>
Expand All @@ -80,7 +80,7 @@ const Info = ({ member }) => {
<div className='col-xs-12 no-side-padding flex-vertical-center' style={{fontSize: '14px'}}>
<Link to={`${member.url}collections`} className='no-anchor-styles flex-vertical-center'>
<React.Fragment>
<CollectionIcon color='disabled' style={{marginRight: '5px', width: '18px'}} />
<CollectionIcon style={{marginRight: '5px', width: '18px', color: GREEN}} />
<span>{`Owner of ${member.collections} public collections`}</span>
</React.Fragment>
</Link>
Expand All @@ -92,8 +92,7 @@ const Info = ({ member }) => {
<div className='col-xs-12 no-side-padding flex-vertical-center' style={{fontSize: '14px'}}>
<Link to={`${member.url}organizations`} className='no-anchor-styles flex-vertical-center'>
<React.Fragment>

<OrgIcon color='disabled' style={{marginRight: '5px', width: '18px'}} />
<OrgIcon style={{marginRight: '5px', width: '18px', color: ORANGE}} />
<span>{`Member of ${member.organizations} organizations`}</span>
</React.Fragment>
</Link>
Expand Down
23 changes: 12 additions & 11 deletions src/components/users/UserHomeDetails.jsx
Expand Up @@ -16,6 +16,7 @@ import APIService from '../../services/APIService';
import {
formatDate, currentUserToken, formatWebsiteLink, copyToClipboard, getCurrentUserUsername
} from '../../common/utils';
import { ORANGE } from '../../common/constants';
import HeaderLogo from '../common/HeaderLogo';
import CommonFormDrawer from '../common/CommonFormDrawer';
import UserForm from './UserForm';
Expand Down Expand Up @@ -79,13 +80,13 @@ const UserHomeDetails = ({ user, isLoading }) => {
{
user.is_superuser &&
<Tooltip title='OCL Super Admin'>
<AdminIcon />
<AdminIcon style={{color: ORANGE}} />
</Tooltip>
}
{
user.is_staff && !user.is_superuser &&
<Tooltip title='OCL Admin'>
<AdminIcon />
<AdminIcon style={{color: ORANGE}} />
</Tooltip>
}
</div>
Expand Down Expand Up @@ -154,15 +155,15 @@ const UserHomeDetails = ({ user, isLoading }) => {
{
token && isSameAsCurrentUser &&
<React.Fragment>
<Divider style={{width: '100%', margin: '5px 0'}} />
<p>
<strong>API Token</strong>
<Tooltip arrow title="Click to copy Token" placement='right'>
<IconButton style={{marginLeft: '10px'}} size="small" onClick={() => copyToClipboard(token, 'Token copied to clipboard!')}>
<CopyIcon fontSize="small" />
</IconButton>
</Tooltip>
</p>
<Divider style={{width: '100%', margin: '5px 0'}} />
<p>
<strong>API Token</strong>
<Tooltip arrow title="Click to copy Token" placement='right'>
<IconButton style={{marginLeft: '10px'}} size="small" onClick={() => copyToClipboard(token, 'Token copied to clipboard!')}>
<CopyIcon fontSize="small" />
</IconButton>
</Tooltip>
</p>
</React.Fragment>
}
</div>
Expand Down

0 comments on commit 396b67a

Please sign in to comment.