mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-28 11:13:11 +01:00
45 lines
898 B
Vue
45 lines
898 B
Vue
|
<template>
|
||
|
<div>
|
||
|
<modal v-model="ShowModal">
|
||
|
<div>
|
||
|
Resource not found, please <router-link :to="{ name: 'accounts' }" class="is-text has-text-white">refresh</router-link>
|
||
|
</div>
|
||
|
</modal>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
|
||
|
<script>
|
||
|
import Modal from '../components/Modal'
|
||
|
|
||
|
export default {
|
||
|
data(){
|
||
|
return {
|
||
|
ShowModal : true
|
||
|
}
|
||
|
},
|
||
|
|
||
|
components: {
|
||
|
Modal
|
||
|
},
|
||
|
|
||
|
mounted(){
|
||
|
// stop OTP generation on modal close
|
||
|
this.$on('modalClose', function() {
|
||
|
this.$router.push({name: 'accounts' });
|
||
|
});
|
||
|
|
||
|
},
|
||
|
|
||
|
beforeRouteEnter (to, from, next) {
|
||
|
if ( ! localStorage.getItem('jwt')) {
|
||
|
return next('login')
|
||
|
}
|
||
|
|
||
|
next()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
|