Prompt for page refresh when 2FAccount is missing

This commit is contained in:
Bubka 2020-01-09 22:11:11 +01:00
parent 31d6450d3f
commit ea5bff816e

View File

@ -35,6 +35,11 @@
<one-time-password ref="OneTimePassword"></one-time-password>
</twofaccount-show>
</modal>
<modal v-model="ShowNoTwofaccountInModal">
<div>
resource not found, please <a @click="()=>{this.$router.go()}" class="is-text has-text-white">refresh</a>
</div>
</modal>
<footer class="has-background-black-ter">
<div class="columns is-gapless" v-if="this.accounts.length > 0">
<div class="column has-text-centered">
@ -87,6 +92,7 @@
return {
accounts : [],
ShowTwofaccountInModal : false,
ShowNoTwofaccountInModal : false,
twofaccount: {},
token : null,
username : null,
@ -122,6 +128,11 @@
this.$on('modalClose', function() {
console.log('modalClose triggered')
this.$refs.OneTimePassword.clearOTP()
this.twofaccount.id = ''
this.twofaccount.service = ''
this.twofaccount.account = ''
this.twofaccount.icon = ''
});
},
@ -151,6 +162,9 @@
this.ShowTwofaccountInModal = true;
})
.catch(error => {
this.ShowNoTwofaccountInModal = true;
});
},
deleteAccount: function (id) {