-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.vue
More file actions
45 lines (41 loc) · 1.51 KB
/
error.vue
File metadata and controls
45 lines (41 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<script setup lang="ts">
definePageMeta({
layout: 'no-layout',
});
const error = useError();
</script>
<template>
<div class="min-h-screen bg-base-100">
<div class="navbar bg-primary text-white shadow-lg">
<div class="navbar-start">
<NuxtLink to="/" class="btn btn-ghost btn-circle" :aria-label="$t('common.error.goHome')">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"/>
</svg>
</NuxtLink>
</div>
<div class="navbar-center">
<span class="text-xl font-semibold">{{ $t('common.error.title') }}</span>
</div>
<div class="navbar-end"/>
</div>
<div class="flex flex-col items-center justify-center py-20 text-center">
<div class="max-w-md">
<h1 class="text-9xl font-bold text-primary">{{ error?.statusCode }}</h1>
<p class="mt-4 text-2xl font-bold tracking-tight sm:text-4xl">
{{ error?.statusMessage || $t('common.error.defaultMessage') }}
</p>
<p v-if="error?.message && error.statusCode !== 404" class="mt-4 text-base text-base-content/70">
{{ error.message }}
</p>
<div class="mt-6">
<NuxtLink to="/" class="btn btn-primary">
{{ $t('common.error.goHome') }}
</NuxtLink>
</div>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
</style>