2021-08-07 14:28:48 +02:00
|
|
|
<template>
|
2021-10-02 16:16:58 +02:00
|
|
|
<div id="error">
|
2021-08-07 14:28:48 +02:00
|
|
|
<div class="error-content">
|
|
|
|
<h1>{{ title }}</h1>
|
|
|
|
<p>{{ message }}</p>
|
|
|
|
<button v-if="buttonText" @click="$router.push(path)" class="upper">
|
|
|
|
{{ buttonText }}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2021-11-10 21:19:27 +01:00
|
|
|
<script setup lang="ts">
|
|
|
|
import { toRefs, withDefaults } from 'vue'
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
title: string
|
|
|
|
message: string
|
|
|
|
buttonText: string
|
|
|
|
path?: string
|
|
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
|
|
path: '/',
|
2021-08-07 14:28:48 +02:00
|
|
|
})
|
2021-11-10 21:19:27 +01:00
|
|
|
const { buttonText, title, message, path } = toRefs(props)
|
2021-08-07 14:28:48 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
2021-10-02 16:16:58 +02:00
|
|
|
#error {
|
2021-08-07 14:28:48 +02:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
height: 75vh;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
.error-content {
|
|
|
|
margin-top: 50px;
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
font-size: 6em;
|
|
|
|
text-shadow: 4px 4px 0 var(--app-shadow-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
p {
|
|
|
|
font-size: 1.2em;
|
|
|
|
margin: 30px 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|