Skip to content

Commit

Permalink
Add malicious tag icon
Browse files Browse the repository at this point in the history
  • Loading branch information
sarus committed May 30, 2022
1 parent 30ea624 commit aa8d9fb
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
40 changes: 38 additions & 2 deletions styles/us.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@border-color: #dee2e6;
@warning-color: #FF4559;

pre {
overflow-y: scroll;
Expand All @@ -8,11 +9,11 @@ pre {
white-space: pre-wrap;
}

.url{
.url {
word-break: break-all !important;
}

.error-container{
.error-container {
white-space: pre-wrap;
}

Expand Down Expand Up @@ -136,3 +137,38 @@ pre {
}
}
}

.danger-summary-tag {
padding: 0 !important;

.icon-container {
background-color: @warning-color;
height: 100%;
padding: 3px 2px;
margin-bottom: 0px;
display: inline-block;

svg {
margin-bottom: 1px;
}
}

.summary-tag {
padding: 0.25em 0em 0.25em 0.25em;
display: inline-block;
}

.data {
padding: 0.25em 0.4em 0.25em 0.25em;
display: inline-block;
}

.stripe-bg {
color: white;
background: repeating-linear-gradient(45deg,
@warning-color,
@warning-color 5px,
lighten(@warning-color, 5%) 5px,
lighten(@warning-color, 5%) 10px) !important;
}
}
15 changes: 15 additions & 0 deletions templates/us-summary.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@
{{/if}}
</span>
</span>
{{#if overallVerdict.malicious}}
<span {{on "click" (optional this.scrollToIntegration)}} class="danger-summary-tag integration-summary-tag integration-background-color integration-border-color">
<span class="summary-tag acronym integration-text-bold-color">{{block.acronym}}</span>
<span class="icon-container stripe-bg">{{fa-icon icon="exclamation" fixedWidth=true}}</span>
<span class="data integration-text-color">Malicious</span>
</span>
{{else}}
<span
{{on 'click' (optional this.scrollToIntegration)}}
class='integration-summary-tag integration-background-color integration-border-color'
>
<span class='acronym integration-text-bold-color'>{{block.acronym}}</span>
<span class='integration-text-color'>Not Malicious</span>
</span>
{{/if}}

{{#if (or overallVerdict.score (eq overallVerdict.score 0))}}
<span
Expand Down

0 comments on commit aa8d9fb

Please sign in to comment.