mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-10-16 02:10:49 +02:00
recursive navigation
This commit is contained in:
23
website/app/pages/manga/author/[authorId].vue
Normal file
23
website/app/pages/manga/author/[authorId].vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<TrangaPage :back="backUrl ? { href: backUrl, icon: 'i-lucide-arrow-left', text: 'Back' } : undefined">
|
||||
<template #title>
|
||||
<h1 class="text-2xl">
|
||||
Manga with Author <UBadge variant="outline" color="neutral" class="font-semibold text-xl ml-1">{{ author?.name }}</UBadge>
|
||||
</h1>
|
||||
</template>
|
||||
<LoadingPage :loading="status === 'pending'">
|
||||
<MangaCardList :manga="manga" @click="(m) => navigateTo(`/manga/${m.key}?return=${route.fullPath}`)" />
|
||||
</LoadingPage>
|
||||
</TrangaPage>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const route = useRoute();
|
||||
const authorId = route.params.authorId as string;
|
||||
const backUrl = route.query.return as string | undefined;
|
||||
|
||||
const { data: author } = await useApi('/v2/Author/{AuthorId}', { path: { AuthorId: authorId } });
|
||||
const { data: manga, status } = await useApi('/v2/Manga/WithAuthorId/{AuthorId}', { path: { AuthorId: authorId }, lazy: true });
|
||||
|
||||
useHead({ title: 'Author Search' });
|
||||
</script>
|
Reference in New Issue
Block a user