2019-08-24 03:06:57 +00:00
|
|
|
<template>
|
|
|
|
|
<div class="page page-error">
|
2021-05-17 11:41:58 +00:00
|
|
|
<h1 class="mb-4 font-mono text-4xl">{{ statusCode }}</h1>
|
|
|
|
|
<h3 class="mb-4 font-mono text-xs">{{ message }}</h3>
|
2021-06-12 16:46:17 +00:00
|
|
|
<p class="mt-4 border-t border-tooltip">
|
2019-10-25 08:14:34 +00:00
|
|
|
<nuxt-link to="/">
|
2021-05-17 11:41:58 +00:00
|
|
|
<button class="icon">
|
|
|
|
|
<i class="material-icons">home</i>
|
|
|
|
|
<span>
|
|
|
|
|
{{ $t("go_home") }}
|
|
|
|
|
</span>
|
|
|
|
|
</button>
|
2019-10-25 08:14:34 +00:00
|
|
|
</nuxt-link>
|
2021-05-17 11:41:58 +00:00
|
|
|
<button class="icon" @click="reloadApplication">
|
|
|
|
|
<i class="material-icons">refresh</i>
|
|
|
|
|
<span>
|
|
|
|
|
{{ $t("reload") }}
|
|
|
|
|
</span>
|
|
|
|
|
</button>
|
2019-10-25 08:14:34 +00:00
|
|
|
</p>
|
2019-08-24 03:06:57 +00:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2021-06-17 12:22:59 +00:00
|
|
|
import { initializeFirebase } from "~/helpers/fb"
|
|
|
|
|
|
2019-11-02 05:32:21 +00:00
|
|
|
export default {
|
2021-05-17 11:41:58 +00:00
|
|
|
props: {
|
|
|
|
|
error: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: null,
|
2020-02-24 18:44:50 +00:00
|
|
|
},
|
2019-11-02 05:32:21 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
head() {
|
|
|
|
|
return {
|
|
|
|
|
bodyAttrs: {
|
2020-02-25 02:06:23 +00:00
|
|
|
class: "sticky-footer",
|
2020-02-24 18:44:50 +00:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-17 11:41:58 +00:00
|
|
|
computed: {
|
|
|
|
|
statusCode() {
|
|
|
|
|
return (this.error && this.error.statusCode) || 500
|
|
|
|
|
},
|
|
|
|
|
message() {
|
|
|
|
|
return this.error.message || this.$t("something_went_wrong")
|
|
|
|
|
},
|
|
|
|
|
},
|
2021-06-21 04:27:45 +00:00
|
|
|
beforeMount() {
|
|
|
|
|
initializeFirebase()
|
|
|
|
|
},
|
2021-05-17 11:41:58 +00:00
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
reloadApplication() {
|
|
|
|
|
window.location.reload()
|
|
|
|
|
},
|
|
|
|
|
},
|
2020-02-24 18:44:50 +00:00
|
|
|
}
|
2019-08-24 03:06:57 +00:00
|
|
|
</script>
|
2021-05-17 11:41:58 +00:00
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
// Center the error page in the viewport.
|
|
|
|
|
.page-error {
|
|
|
|
|
@apply flex;
|
|
|
|
|
@apply items-center;
|
|
|
|
|
@apply justify-center;
|
|
|
|
|
@apply flex-col;
|
|
|
|
|
@apply text-center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.error_banner {
|
|
|
|
|
@apply w-24;
|
|
|
|
|
@apply mb-12;
|
|
|
|
|
}
|
|
|
|
|
</style>
|