@@ -93,7 +93,9 @@ class ComponentNavBreadcrumbs extends React.PureComponent { | |||
</span> | |||
)} | |||
{items} | |||
{component.visibility === 'private' && <PrivateBadge className="spacer-left" />} | |||
{component.visibility === 'private' && ( | |||
<PrivateBadge className="spacer-left" qualifier={component.qualifier} /> | |||
)} | |||
</h1> | |||
); | |||
} |
@@ -57,7 +57,9 @@ export default function ProjectCardLeak({ organization, project }: Props) { | |||
</h2> | |||
{project.analysisDate && <ProjectCardQualityGate status={measures!['alert_status']} />} | |||
<div className="pull-right text-right"> | |||
{isPrivate && <PrivateBadge className="spacer-left" tooltipPlacement="left" />} | |||
{isPrivate && ( | |||
<PrivateBadge className="spacer-left" qualifier="TRK" tooltipPlacement="left" /> | |||
)} | |||
{hasTags && <TagsList tags={project.tags} customClass="spacer-left" />} | |||
</div> | |||
{project.analysisDate && |
@@ -56,7 +56,9 @@ export default function ProjectCardOverall({ organization, project }: Props) { | |||
</h2> | |||
{project.analysisDate && <ProjectCardQualityGate status={measures['alert_status']} />} | |||
<div className="pull-right text-right"> | |||
{isPrivate && <PrivateBadge className="spacer-left" tooltipPlacement="left" />} | |||
{isPrivate && ( | |||
<PrivateBadge className="spacer-left" qualifier="TRK" tooltipPlacement="left" /> | |||
)} | |||
{hasTags && <TagsList tags={project.tags} customClass="spacer-left" />} | |||
</div> | |||
{project.analysisDate && ( |
@@ -64,7 +64,9 @@ export default class ProjectRow extends React.PureComponent<Props> { | |||
</td> | |||
<td className="thin nowrap"> | |||
{project.visibility === Visibility.Private && <PrivateBadge />} | |||
{project.visibility === Visibility.Private && ( | |||
<PrivateBadge qualifier={project.qualifier} /> | |||
)} | |||
</td> | |||
<td className="nowrap"> |
@@ -39,7 +39,9 @@ exports[`renders 1`] = ` | |||
<td | |||
className="thin nowrap" | |||
> | |||
<PrivateBadge /> | |||
<PrivateBadge | |||
qualifier="TRK" | |||
/> | |||
</td> | |||
<td | |||
className="nowrap" | |||
@@ -148,7 +150,9 @@ exports[`renders 2`] = ` | |||
<td | |||
className="thin nowrap" | |||
> | |||
<PrivateBadge /> | |||
<PrivateBadge | |||
qualifier="TRK" | |||
/> | |||
</td> | |||
<td | |||
className="nowrap" |
@@ -24,12 +24,15 @@ import { translate } from '../../helpers/l10n'; | |||
interface Props { | |||
className?: string; | |||
qualifier: string; | |||
tooltipPlacement?: string; | |||
} | |||
export default function PrivateBadge({ className, tooltipPlacement = 'bottom' }: Props) { | |||
export default function PrivateBadge({ className, qualifier, tooltipPlacement = 'bottom' }: Props) { | |||
return ( | |||
<Tooltip overlay={translate('visibility.private.description')} placement={tooltipPlacement}> | |||
<Tooltip | |||
overlay={translate('visibility.private.description', qualifier)} | |||
placement={tooltipPlacement}> | |||
<div className={classNames('outline-badge', className)}> | |||
{translate('visibility.private')} | |||
</div> |
@@ -22,5 +22,5 @@ import { shallow } from 'enzyme'; | |||
import PrivateBadge from '../PrivateBadge'; | |||
it('renders', () => { | |||
expect(shallow(<PrivateBadge />)).toMatchSnapshot(); | |||
expect(shallow(<PrivateBadge qualifier="TRK" />)).toMatchSnapshot(); | |||
}); |
@@ -2,7 +2,7 @@ | |||
exports[`renders 1`] = ` | |||
<Tooltip | |||
overlay="visibility.private.description" | |||
overlay="visibility.private.description.TRK" | |||
placement="bottom" | |||
> | |||
<div |
@@ -526,7 +526,9 @@ visibility.public=Public | |||
visibility.public.description=This project is public. Anyone can browse and see the source code. | |||
visibility.public.description.short=Anyone can browse and see the source code. | |||
visibility.private=Private | |||
visibility.private.description=This project is private. Only authorized users can browse and see the source code. | |||
visibility.private.description.TRK=This project is private. Only authorized users can browse and see the source code. | |||
visibility.private.description.VW=This portfolio is private. Only authorized users can browse it. | |||
visibility.private.description.APP=This application is private. Only authorized users can browse it. | |||
visibility.private.description.short=Only authorized users can browse and see the source code. | |||