-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.vue
More file actions
46 lines (40 loc) · 1.06 KB
/
error.vue
File metadata and controls
46 lines (40 loc) · 1.06 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
46
<script setup lang="ts">
import { storeToRefs } from 'pinia'
import { VEmptyState } from 'vuetify/lib/labs/components.mjs'
import { useSiteStore } from '~/stores/site'
import type { NuxtError } from '#app'
defineProps({
error: Object as () => NuxtError,
})
const { logoUrl } = storeToRefs(useSiteStore())
const handleError = () => reloadNuxtApp({ path: '/' })
</script>
<template>
<NuxtLayout name="error">
<v-container :style="{ height: '100vh' }">
<VEmptyState
v-if="error"
color="elevated"
:image="logoUrl"
:headline="$t('error.statusCode', { status: error.statusCode })"
:text="error.message"
:action-text="$t('error.backHome')"
@click:action="handleError"
/>
</v-container>
</NuxtLayout>
</template>
<style lang="css" scoped>
:deep(.v-empty-state__text) {
word-break: break-word;
background-color: #202020;
color: #d4d4d4;
box-shadow: 0 4px 6px rgb(0 0 0 / 10%);
border: 1px solid #333;
border-radius: 4px;
padding: 15px;
}
:deep(.v-empty-state__media) {
width: 180px;
}
</style>