api-client/layouts/error.vue

45 lines
941 B
Vue
Raw Normal View History

2019-08-24 03:06:57 +00:00
<template>
<div class="page page-error">
2019-10-11 08:53:07 +00:00
<img src="~static/icons/error.svg" alt="Error" class="error_banner">
<h2>{{ error.statusCode }}</h2>
<h3>{{ error.message }}</h3>
2019-08-24 03:06:57 +00:00
<p><nuxt-link to="/"><button>Go Home</button></nuxt-link></p>
2019-08-24 17:16:52 +00:00
<p><a href="" @click.prevent="reloadApplication">Reload</a></p>
2019-08-24 03:06:57 +00:00
</div>
</template>
<style lang="scss">
// Center the error page in the viewport.
.page-error {
2019-10-11 08:53:07 +00:00
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
2019-08-24 03:06:57 +00:00
text-align: center;
}
2019-10-11 08:53:07 +00:00
.error_banner {
width: 256px;
}
2019-08-24 03:06:57 +00:00
</style>
<script>
export default {
props: ['error'],
2019-08-24 17:01:57 +00:00
2019-08-24 17:16:52 +00:00
methods: {
reloadApplication () {
this.$router.push('/', () => window.location.reload());
2019-08-24 17:01:57 +00:00
}
},
2019-08-24 03:06:57 +00:00
head () {
return {
bodyAttrs: {
class: 'sticky-footer'
}
}
}
}
</script>