mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-03-08 23:03:29 -05:00
feat(checklist): show green progress circle when all checkboxes are done
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user