mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-02-23 22:01:49 +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
|
this.id = id
|
||||||
|
|
||||||
axios.get('api/twofaccounts/' + this.id)
|
axios.get('api/twofaccounts/' + this.id)
|
||||||
.then(response => {
|
.then(async (response) => {
|
||||||
|
|
||||||
this.service = response.data.service
|
this.service = response.data.service
|
||||||
this.account = response.data.account
|
this.account = response.data.account
|
||||||
this.icon = response.data.icon
|
this.icon = response.data.icon
|
||||||
|
|
||||||
this.getOTP()
|
await this.getOTP()
|
||||||
|
this.$parent.isActive = true
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
this.$router.push({ name: 'genericError', params: { err: error.response } });
|
this.$router.push({ name: 'genericError', params: { err: error.response } });
|
||||||
|
@ -137,18 +137,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
async showAccount(id) {
|
showAccount(id) {
|
||||||
|
|
||||||
if( id ) {
|
if( id ) {
|
||||||
await this.$refs.TwofaccountShow.getAccount(id)
|
this.$refs.TwofaccountShow.getAccount(id)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let err = new Error("Id missing")
|
let err = new Error("Id missing")
|
||||||
this.$router.push({ name: 'genericError', params: { err: err } });
|
this.$router.push({ name: 'genericError', params: { err: err } });
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ShowTwofaccountInModal = true
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteAccount: function (id) {
|
deleteAccount: function (id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user