gancio/layouts/error.vue

26 lines
603 B
Vue
Raw Normal View History

2019-06-09 00:45:50 +02:00
<template lang='pug'>
2020-01-14 16:29:53 +01:00
el-main.p-4.text-center#error
h1(v-if="error.statusCode === 404") <i class='el-icon-warning'></i> {{error.message}}
h1(v-else) <i name='el-icon-warning'></i> An error occurred: {{error.message}}
nuxt-link(to='/') Back to home
2019-06-09 00:45:50 +02:00
</template>
<script>
2020-01-14 16:29:53 +01:00
import { mapState } from 'vuex'
2019-06-09 00:45:50 +02:00
export default {
2020-01-14 16:29:53 +01:00
props: { error: { type: Object } },
computed: mapState(['settings']),
head () {
return { title: `${this.settings.title} - Error` }
}
2019-06-09 00:45:50 +02:00
}
</script>
<style lang="less">
#error {
margin-top: 20px;
color: orange;
2020-01-14 16:29:53 +01:00
i { color: orangered }
2019-06-09 00:45:50 +02:00
}
</style>