-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patherror.vue
52 lines (48 loc) · 1.31 KB
/
error.vue
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
46
47
48
49
50
51
52
<template>
<div id="page-body">
<Head>
<Meta name="og:image" :content="`/images/thumbnails/page/Error%20${error.statusCode}/card.png`" />
<Meta name="twitter:image" :content="`/images/thumbnails/page/Error%20${error.statusCode}/card.png`" />
<Meta name="twitter:card" content="summary_large_image" />
<Meta name="twitter:creator" content="@William27528" />
</Head>
<Navbar />
<div>
<ErrorPage :code="error.statusCode.toString()">
{{ message }}
</ErrorPage>
</div>
<Footer />
</div>
</template>
<style scoped>
#page-body {
display: flex;
flex-direction: column;
min-height: 100vh;
}
</style>
<script setup>
const { t } = useI18n()
const { error } = defineProps({
error: {
type: Object,
required: true
}
})
const message = JSON.parse(error?.data ?? '{}')?.error ?? error.message;
definePageMeta({
layout: 'default'
})
useHead({
titleTemplate: (titleChunk) => {
return `${t('site-name')} - Error ${error.statusCode}`;
},
meta: [
{
name: 'description',
content: 'Easily-accessible documentation and information site for all of William278\'s Minecraft plugins, projects & games'
}
],
})
</script>