Add error page and login error redirection
This commit is contained in:
25
js/src/views/Error.vue
Normal file
25
js/src/views/Error.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<div v-if="code === ErrorCode.REGISTRATION_CLOSED">
|
||||
<translate>Registration is currently closed.</translate>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<translate>Unknown error.</translate>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import { ErrorCode } from '@/types/error-code.model';
|
||||
|
||||
@Component
|
||||
export default class ErrorPage extends Vue {
|
||||
code: ErrorCode | null = null;
|
||||
|
||||
ErrorCode = ErrorCode;
|
||||
|
||||
mounted() {
|
||||
this.code = this.$route.query[ 'code' ] as ErrorCode;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user