feat(checklist): show green progress circle when all checkboxes are done

This commit is contained in:
kolaente
2026-02-26 17:07:03 +01:00
parent 80759831ec
commit c4ec7f032f

View File

@@ -6,6 +6,7 @@
<svg
width="12"
height="12"
:class="{'is-all-done': allDone}"
>
<circle
stroke-width="2"
@@ -51,9 +52,11 @@ const checklistCircleDone = computed(() => {
return ((100 - progress) / 100) * c
})
const allDone = computed(() => checklist.value.total === checklist.value.checked)
const {t} = useI18n({useScope: 'global'})
const label = computed(() => {
return checklist.value.total === checklist.value.checked
return allDone.value
? t('task.checklistAllDone', checklist.value)
: t('task.checklistTotal', checklist.value)
})
@@ -81,4 +84,10 @@ circle {
stroke: var(--primary);
}
}
svg.is-all-done circle {
&:last-child {
stroke: var(--success);
}
}
</style>