Skip to content

Commit

Permalink
fix: fixed display of new signature tooltips in some cases
Browse files Browse the repository at this point in the history
Signed-off-by: Raul-Cristian Kele <raulkeleblk@gmail.com>
  • Loading branch information
raulkele committed Aug 29, 2023
1 parent 9ecd46e commit 05dfe2c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/components/Shared/SignatureTooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/objectModels.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const mapSignatureInfo = (signatureInfo) => {
return signatureInfo
? {
tool: signatureInfo.Tool,
isTrusted: signatureInfo.IsTrusted,
isTrusted: signatureInfo.IsTrusted?.toString(),
author: signatureInfo.Author
}
: {
Expand Down
12 changes: 6 additions & 6 deletions src/utilities/vulnerabilityAndSignatureComponents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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={() => {
Expand All @@ -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={() => {
Expand Down Expand Up @@ -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={() => {
Expand All @@ -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={() => {
Expand All @@ -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={() => {
Expand All @@ -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={() => {
Expand Down

0 comments on commit 05dfe2c

Please sign in to comment.