2020-01-10 00:07:37 +01:00
|
|
|
<template>
|
2020-01-14 11:48:42 +01:00
|
|
|
<div class="error-message">
|
2020-01-10 00:07:37 +01:00
|
|
|
<modal v-model="ShowModal">
|
2020-01-14 11:48:42 +01:00
|
|
|
<div class="error-message" v-if="$route.name == '404'">
|
2020-01-10 10:25:29 +01:00
|
|
|
<p class="error-404"></p>
|
2020-01-14 11:48:42 +01:00
|
|
|
<p>{{ $t('errors.resource_not_found') }}</p>
|
|
|
|
<p class="">{{ $t('errors.please') }}<router-link :to="{ name: 'accounts' }" class="is-text has-text-white">{{ $t('errors.refresh') }}</router-link></p>
|
2020-01-10 10:25:29 +01:00
|
|
|
</div>
|
2020-01-13 22:24:14 +01:00
|
|
|
<div v-else-if="$route.name == 'flooded'">
|
|
|
|
<p class="error-generic"></p>
|
2020-01-14 11:48:42 +01:00
|
|
|
<p>
|
|
|
|
{{ $t('errors.already_one_user_registered') }}<br>
|
|
|
|
{{ $t('errors.cannot_register_more_user') }}
|
|
|
|
</p>
|
|
|
|
<p>{{ $t('errors.please') }}<router-link :to="{ name: 'accounts' }" class="is-text has-text-white">{{ $t('auth.sign_in') }}</router-link></p>
|
2020-01-13 22:24:14 +01:00
|
|
|
</div>
|
2020-01-10 10:25:29 +01:00
|
|
|
<div v-else>
|
|
|
|
<p class="error-generic"></p>
|
2020-01-14 11:48:42 +01:00
|
|
|
<p>{{ $t('errors.error_occured') }}</p>
|
|
|
|
<p v-if="debugMessage">{{ debugMessage }}</p>
|
|
|
|
<p>{{ $t('errors.please') }}<router-link :to="{ name: 'accounts' }" class="is-text has-text-white">{{ $t('errors.refresh') }}</router-link></p>
|
2020-01-10 00:07:37 +01:00
|
|
|
</div>
|
2020-01-13 23:10:32 +01:00
|
|
|
<!-- <div v-if="debugMode == 'development'"> -->
|
|
|
|
<!-- </div> -->
|
2020-01-10 00:07:37 +01:00
|
|
|
</modal>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Modal from '../components/Modal'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data(){
|
|
|
|
return {
|
2020-01-10 15:00:55 +01:00
|
|
|
ShowModal : true,
|
2020-01-14 11:48:42 +01:00
|
|
|
debugMessage : this.err ? this.err : null,
|
2020-01-10 00:07:37 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2020-01-10 15:00:55 +01:00
|
|
|
computed: {
|
|
|
|
debugMode: function() {
|
|
|
|
return process.env.NODE_ENV
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
props: ['err'],
|
|
|
|
|
2020-01-10 00:07:37 +01:00
|
|
|
components: {
|
|
|
|
Modal
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted(){
|
|
|
|
// stop OTP generation on modal close
|
|
|
|
this.$on('modalClose', function() {
|
|
|
|
this.$router.push({name: 'accounts' });
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|