feat: empty list message
This commit is contained in:
@@ -19,6 +19,8 @@ const showNextReset = booleanCookieRef("toutDouxShowNextReset", false);
|
||||
const separateCompleted = booleanCookieRef("toutDouxSeparateCompleted", false);
|
||||
|
||||
const hasCompleted = computed<boolean>(() => tasks.value.some(taskCompleted));
|
||||
const empty = computed<boolean>(() => tasks.value.length === 0);
|
||||
const allCompleted = computed<boolean>(() => tasks.value.every(taskCompleted));
|
||||
|
||||
function fetchTasks() {
|
||||
void getTasks(list.value)
|
||||
@@ -88,6 +90,12 @@ onBeforeMount(fetchTasks);
|
||||
/>
|
||||
</li>
|
||||
</template>
|
||||
<li v-if="empty" class="list-row italic text-xl font-extralight">
|
||||
{{ $t('empty_hint') }}
|
||||
</li>
|
||||
<li v-if="allCompleted && separateCompleted" class="list-row italic text-xl font-extralight">
|
||||
{{ $t('all_completed_hint') }}
|
||||
</li>
|
||||
<li class="list-row">
|
||||
<div class="list-col-grow">
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user