Skip to content

Commit 65bb7ae

Browse files
committed
fix: propery display binary Lighthouse results
Fixes that we were displaying binary Lighthouse results as numbers.
1 parent 3dd637b commit 65bb7ae

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

report-app/src/app/pages/report-viewer/lighthouse-category.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ import {Score} from '../../shared/score/score';
2424
@for (audit of audits; track audit.id) {
2525
<li>
2626
@if (audit.score != null) {
27-
<score size="tiny" [total]="audit.score" [max]="1"/>
27+
@if (audit.scoreDisplayMode === 'binary') {
28+
@let isPass = audit.score === 1;
29+
<span class="status-text material-symbols-outlined {{isPass ? 'success' : 'error'}}">
30+
{{isPass ? 'check' : 'close'}}
31+
</span>
32+
} @else {
33+
<score size="tiny" [total]="audit.score" [max]="1"/>
34+
}
2835
}
2936
{{audit.title}}{{audit.displayValue ? ': ' + audit.displayValue : ''}}
3037

0 commit comments

Comments
 (0)