fix: fixed display of new signature tooltips in some cases (#379)

Signed-off-by: Raul-Cristian Kele <raulkeleblk@gmail.com>
This commit is contained in:
Raul Kele 2023-08-29 19:46:13 +03:00 committed by GitHub
parent 9ecd46e4d0
commit b787273b84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -12,8 +12,8 @@ function SignatureTooltip({ isSigned, signatureInfo }) {
<Stack direction="column">
<Typography>{isSigned ? 'Verified Signature' : 'Unverified Signature'}</Typography>
<Typography>Tool: {tool}</Typography>
<Typography>Trusted: {isTrusted ? 'Yes' : 'No'}</Typography>
<Typography>Author: {author}</Typography>
<Typography>Trusted: {!isEmpty(isTrusted) ? isTrusted : 'Unknown'}</Typography>
<Typography>Author: {!isEmpty(author) ? author : 'Unknown'}</Typography>
</Stack>
);
}

View File

@ -101,7 +101,7 @@ const mapSignatureInfo = (signatureInfo) => {
return signatureInfo
? {
tool: signatureInfo.Tool,
isTrusted: signatureInfo.IsTrusted,
isTrusted: signatureInfo.IsTrusted?.toString(),
author: signatureInfo.Author
}
: {

View File

@ -145,7 +145,7 @@ const CriticalVulnerabilityIcon = ({ vulnerabilityStringTitle }) => {
const NoneVulnerabilityChip = () => {
return (
<Chip
label="No Vulnerability"
label="None"
sx={{ backgroundColor: '#E8F5E9', color: '#388E3C', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {
@ -159,7 +159,7 @@ const NoneVulnerabilityChip = () => {
const UnknownVulnerabilityChip = () => {
return (
<Chip
label="Unknown Vulnerability"
label="Unknown"
sx={{ backgroundColor: '#ECEFF1', color: '#52637A', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {
@ -187,7 +187,7 @@ const FailedScanChip = () => {
const LowVulnerabilityChip = () => {
return (
<Chip
label="Low Vulnerability"
label="Low"
sx={{ backgroundColor: '#FFF3E0', color: '#FB8C00', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {
@ -201,7 +201,7 @@ const LowVulnerabilityChip = () => {
const MediumVulnerabilityChip = () => {
return (
<Chip
label="Medium Vulnerability"
label="Medium"
sx={{ backgroundColor: '#FFF3E0', color: '#FB8C00', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {
@ -215,7 +215,7 @@ const MediumVulnerabilityChip = () => {
const HighVulnerabilityChip = () => {
return (
<Chip
label="High Vulnerability"
label="High"
sx={{ backgroundColor: '#FEEBEE', color: '#E53935', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {
@ -229,7 +229,7 @@ const HighVulnerabilityChip = () => {
const CriticalVulnerabilityChip = () => {
return (
<Chip
label="Critical Vulnerability"
label="Critical"
sx={{ backgroundColor: '#FEEBEE', color: '#E53935', fontSize: '0.8125rem' }}
variant="filled"
onDelete={() => {