forked from hoppscotch/hoppscotch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.vue
50 lines (45 loc) · 891 Bytes
/
error.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<template>
<div class="page page-error">
<img src="~static/icons/error.svg" alt="Error" class="error_banner" />
<h2>{{ error.statusCode }}</h2>
<h3>{{ error.message }}</h3>
<p>
<nuxt-link to="/">
<button>Go Home</button>
</nuxt-link>
</p>
<p>
<a href @click.prevent="reloadApplication">Reload</a>
</p>
</div>
</template>
<style scoped lang="scss">
// Center the error page in the viewport.
.page-error {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
text-align: center;
}
.error_banner {
width: 256px;
}
</style>
<script>
export default {
props: ["error"],
methods: {
reloadApplication() {
this.$router.push("/", () => window.location.reload());
}
},
head() {
return {
bodyAttrs: {
class: "sticky-footer"
}
};
}
};
</script>