guest role; guide section ticking
This commit is contained in:
@@ -122,10 +122,14 @@ function resetProgress () {
|
||||
saveProgress()
|
||||
}
|
||||
|
||||
// Everything that can be ticked: checklist items, and the sections a reader
|
||||
// crosses off to keep their place - a step, or a heading on a guide that has
|
||||
// no steps at all (a converted article often has fifty headings and none).
|
||||
const totalChecks = computed(() => {
|
||||
let total = 0
|
||||
for (const block of guide.value?.blocks || []) {
|
||||
if (block.type === 'checklist') total += (block.items || []).length
|
||||
else if (block.type === 'step' || block.type === 'heading') total += 1
|
||||
}
|
||||
return total
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user