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:
@@ -1,13 +1,18 @@
|
||||
<template>
|
||||
<MangaDetailPage :manga="manga" :back="{ text: 'Back', href: `/manga/${mangaId}`, icon: 'i-lucide-arrow-left' }" title="Merge with">
|
||||
<MangaDetailPage
|
||||
:manga="manga"
|
||||
:back="{ text: 'Back', href: backUrl ?? `/manga/${mangaId}`, icon: 'i-lucide-arrow-left' }"
|
||||
title="Merge with">
|
||||
<USkeleton v-if="!mangas" class="w-full h-[350px]" />
|
||||
<MangaCardList :manga="mangas" @click="(m) => navigateTo(`/manga/${mangaId}/merge/${m.key}`)" />
|
||||
<MangaCardList :manga="mangas" @click="(m) => navigateTo(`/manga/${mangaId}/merge/${m.key}?return=${path}`)" />
|
||||
</MangaDetailPage>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const route = useRoute();
|
||||
const mangaId = route.params.mangaId as string;
|
||||
const backUrl = route.query.return as string | undefined;
|
||||
const path = route.fullPath;
|
||||
|
||||
const { data: manga } = await useApi('/v2/Manga/{MangaId}', { path: { MangaId: mangaId }, key: FetchKeys.Manga.Id(mangaId) });
|
||||
const { data: mangas } = await useApi('/v2/Manga', { key: FetchKeys.Manga.All });
|
||||
|
Reference in New Issue
Block a user