Loadingpage

MangaCardList
Manga with Tag Page
This commit is contained in:
2025-10-14 15:37:58 +02:00
parent a81212537c
commit 570d8014a1
7 changed files with 69 additions and 19 deletions

View File

@@ -1,17 +1,12 @@
<template>
<UPageBody class="p-4 flex flex-row flex-wrap gap-6 mt-0">
<MangaCard v-for="(m, i) in manga" :key="m.key" :manga="m" :expanded="i === expanded" @click="expanded = expanded === i ? -1 : i">
<template #actions="formanga">
<UButton :to="`manga/${formanga.key}`">Details</UButton>
</template>
</MangaCard>
</UPageBody>
<LoadingPage :loading="status === 'pending'" class="p-4 flex flex-row flex-wrap gap-6 mt-0">
<MangaCardList :manga="manga" />
</LoadingPage>
</template>
<script setup lang="ts">
const { data: manga, refresh } = await useApi('/v2/Manga', { key: FetchKeys.Manga.All, lazy: true });
const { data: manga, refresh, status } = await useApi('/v2/Manga', { key: FetchKeys.Manga.All, lazy: true });
onMounted(() => refresh());
const expanded = ref(-1);
useHead({ title: 'Tranga' });
</script>