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

View File

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