api-client/layouts/error.vue

51 lines
923 B
Vue
Raw Normal View History

2019-08-24 03:06:57 +00:00
<template>
<div class="page page-error">
2020-02-24 18:44:50 +00:00
<img src="~static/icons/error.svg" :alt="$t('error')" class="error_banner" />
2019-10-11 08:53:07 +00:00
<h2>{{ error.statusCode }}</h2>
<h3>{{ error.message }}</h3>
2019-10-25 08:14:34 +00:00
<p>
<nuxt-link to="/">
<button>{{ $t("go_home") }}</button>
2019-10-25 08:14:34 +00:00
</nuxt-link>
</p>
<p>
<a href @click.prevent="reloadApplication">{{ $t("reload") }}</a>
2019-10-25 08:14:34 +00:00
</p>
2019-08-24 03:06:57 +00:00
</div>
</template>
2019-12-06 01:41:38 +00:00
<style scoped lang="scss">
2019-11-02 05:32:21 +00:00
// Center the error page in the viewport.
.page-error {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
text-align: center;
}
2019-10-11 08:53:07 +00:00
2019-11-02 05:32:21 +00:00
.error_banner {
width: 256px;
}
2019-08-24 03:06:57 +00:00
</style>
<script>
2019-11-02 05:32:21 +00:00
export default {
props: ["error"],
2019-10-25 08:14:34 +00:00
2019-11-02 05:32:21 +00:00
methods: {
reloadApplication() {
this.$router.push("/", () => window.location.reload())
2020-02-24 18:44:50 +00:00
},
2019-11-02 05:32:21 +00:00
},
head() {
return {
bodyAttrs: {
class: "sticky-footer",
2020-02-24 18:44:50 +00:00
},
}
},
}
2019-08-24 03:06:57 +00:00
</script>