mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-10-18 03:10:47 +02:00
Fix LibrarySelect
Move recursive routing to trangapage
This commit is contained in:
@@ -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>();
|
||||
|
Reference in New Issue
Block a user