mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-10-15 09:50:48 +02:00
Add error page
Add loading skeleton
This commit is contained in:
16
website/app/error.vue
Normal file
16
website/app/error.vue
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<h1>{{ error?.statusCode }}</h1>
|
||||||
|
<p>{{ error?.message }}</p>
|
||||||
|
<NuxtLink to="/">Go back home</NuxtLink>
|
||||||
|
<NuxtLink to="https://github.com/C9Glax/tranga-website/issues/new"><Icon name="i-lucide-github" />Report this issue</NuxtLink>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import type { NuxtError } from '#app'
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
error: Object as () => NuxtError,
|
||||||
|
})
|
||||||
|
</script>
|
@@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<UPageBody class="p-4 flex flex-row flex-wrap gap-6 mt-0">
|
<UPageBody class="p-4 flex flex-row flex-wrap gap-6 mt-0">
|
||||||
|
<USkeleton v-if="status !== 'success'" class="max-w-[600px] w-full h-[350px]" />
|
||||||
<MangaCard
|
<MangaCard
|
||||||
|
v-else
|
||||||
v-for="(m, i) in manga"
|
v-for="(m, i) in manga"
|
||||||
:manga="m"
|
:manga="m"
|
||||||
:expanded="i === expanded"
|
:expanded="i === expanded"
|
||||||
@@ -13,6 +15,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const { data: manga } = await useApi('/v2/Manga', { key: FetchKeys.Manga.All });
|
const { data: manga, status } = await useApi('/v2/Manga', { key: FetchKeys.Manga.All, lazy: true });
|
||||||
const expanded = ref(-1);
|
const expanded = ref(-1);
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user