File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " enspire " : patch
3
+ ---
4
+
5
+ Add customized error page
Original file line number Diff line number Diff line change
1
+ <script setup lang="ts">
2
+ import type { NuxtError } from ' #app'
3
+
4
+ const props = defineProps ({
5
+ error: Object as () => NuxtError ,
6
+ })
7
+
8
+ const handleError = () => reloadNuxtApp ({ path: ' /' })
9
+ </script >
10
+
11
+ <template >
12
+ <div class =" min-h-screen flex items-center px-4 py-12 lg:px-12 md:px-8 sm:px-6 xl:px-16" >
13
+ <div class =" w-full grid" >
14
+ <div class =" col-start-1 row-start-1 w-full flex h-full items-center justify-center" >
15
+ <div class =" text-9xl text-foreground font-bold tracking-tighter opacity-10" >
16
+ {{ props.error?.statusCode }}
17
+ </div >
18
+ </div >
19
+ <div class =" col-start-1 row-start-1 w-full text-center space-y-6" >
20
+ <div class =" space-y-3" >
21
+ <h1 class =" text-4xl font-bold tracking-tighter sm:text-5xl" >
22
+ Oops! Lost in Cyberspace
23
+ </h1 >
24
+ <p class =" text-gray-500" >
25
+ Looks like you've ventured into the unknown digital realm. <br >
26
+ Don't worry, the error is reported and we'll fix it soon.
27
+ </p >
28
+ </div >
29
+ <div class =" flex justify-center space-x-2" >
30
+ <Button
31
+ @click =" handleError"
32
+ >
33
+ Return to website
34
+ </Button >
35
+ <Button as-child variant =" outline" >
36
+ <NuxtLink to =" https://github.com/Computerization/Enspire/issues" >
37
+ View Ongoing Issues
38
+ </NuxtLink >
39
+ </Button >
40
+ </div >
41
+ </div >
42
+ </div >
43
+ </div >
44
+ </template >
You can’t perform that action at this time.
0 commit comments