Fix LibrarySelect

Move recursive routing to trangapage
This commit is contained in:
2025-10-16 21:35:12 +02:00
parent 732e1a7b1f
commit 2b6818b09e
13 changed files with 72 additions and 58 deletions

View File

@@ -7,9 +7,13 @@
<div :class="['flex flex-col gap-2 w-full py-4 relative max-md:px-2', $slots.left ? '' : 'pl-4']">
<div class="w-full flex flex-row justify-between mb-4">
<div class="flex flex-row gap-6">
<UButton variant="outline" color="neutral" :to="back?.href ?? '/'" :icon="back?.icon ?? 'i-lucide-home'">{{
back?.text ?? 'Home'
}}</UButton>
<UButton
variant="outline"
color="neutral"
:to="backUrl ?? '/'"
:icon="backUrl ? 'i-lucide-arrow-left' : 'i-lucide-home'"
>{{ backUrl ? 'Back' : 'Home' }}</UButton
>
<slot name="title">
<p v-if="title" class="text-2xl text-primary font-semibold">{{ title }}</p>
</slot>
@@ -27,9 +31,11 @@
<script setup lang="ts">
import type { PageBodyProps } from '#ui/components/PageBody.vue';
const route = useRoute();
const backUrl = route.query.return as string | undefined;
export interface PageProps extends PageBodyProps {
title?: string;
back?: { href?: string; text?: string; icon?: string };
}
defineProps<PageProps>();