mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-08 01:14:29 +01:00
Prevent OTP display latency when opening modal
This commit is contained in:
parent
7ded76c92e
commit
ad18021019
@ -33,13 +33,14 @@
|
||||
this.id = id
|
||||
|
||||
axios.get('api/twofaccounts/' + this.id)
|
||||
.then(response => {
|
||||
.then(async (response) => {
|
||||
|
||||
this.service = response.data.service
|
||||
this.account = response.data.account
|
||||
this.icon = response.data.icon
|
||||
|
||||
this.getOTP()
|
||||
await this.getOTP()
|
||||
this.$parent.isActive = true
|
||||
})
|
||||
.catch(error => {
|
||||
this.$router.push({ name: 'genericError', params: { err: error.response } });
|
||||
|
@ -137,18 +137,15 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
async showAccount(id) {
|
||||
showAccount(id) {
|
||||
|
||||
if( id ) {
|
||||
await this.$refs.TwofaccountShow.getAccount(id)
|
||||
this.$refs.TwofaccountShow.getAccount(id)
|
||||
}
|
||||
else {
|
||||
let err = new Error("Id missing")
|
||||
this.$router.push({ name: 'genericError', params: { err: err } });
|
||||
}
|
||||
|
||||
this.ShowTwofaccountInModal = true
|
||||
|
||||
},
|
||||
|
||||
deleteAccount: function (id) {
|
||||
|
Loading…
Reference in New Issue
Block a user