ui: Also color score on works page

This commit is contained in:
nemunaire 2023-03-03 12:38:13 +01:00
parent 99a1e3c111
commit ce1d61b6c4
1 changed files with 10 additions and 1 deletions

View File

@ -120,7 +120,16 @@
{#await getScore(work)}
<div class="spinner-border spinner-border-sm" role="status"></div>
{:then score}
{score.score}
<span
class="badge"
class:bg-success={score.score >= 18}
class:bg-info={score.score < 18 && score.score >= 15}
class:bg-warning={score.score < 15 && score.score >= 9}
class:bg-danger={score.score < 9}
class:bg-dark={score.score == "N/A"}
>
{score.score}
</span>
{:catch error}
<i class="bi text-warning bi-exclamation-triangle-fill" title={error}></i>
{/await}