frontend: Don't count labels in flag count

This commit is contained in:
nemunaire 2023-11-04 18:13:20 +01:00
parent f328261ea2
commit 9cca20c6f8
1 changed files with 2 additions and 2 deletions

View File

@ -157,12 +157,12 @@
</CardHeader>
{#if exercice.flags.length != exercice.nb_flags}
<Progress
value={exercice.flags.length}
value={exercice.flags.filter((f) => f.type !== undefined).length}
max={exercice.nb_flags}
class="rounded-0"
barClassName="text-light"
>
{exercice.flags.filter((f) => f.type != "label").length}/{exercice.nb_flags}
{exercice.flags.filter((f) => f.type !== undefined).length}/{exercice.nb_flags}
</Progress>
{/if}
{#if exercice.tries || exercice.solved_time || exercice.submitted || sberr || timeouted}