2020-11-02 13:39:43 +01:00
|
|
|
<template>
|
|
|
|
<div class="modal modal-otp is-active">
|
|
|
|
<div class="modal-background"></div>
|
|
|
|
<div class="modal-content">
|
|
|
|
<p class="has-text-centered m-5">
|
|
|
|
<img :src="qrcode" class="has-background-light">
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="fullscreen-footer">
|
|
|
|
<!-- Close button -->
|
|
|
|
<label class="button is-dark is-rounded" @click.stop="$router.push({name: 'accounts', params: { InitialEditMode: true }});">
|
|
|
|
{{ $t('commons.close') }}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
qrcode: null,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted: function() {
|
|
|
|
|
|
|
|
this.getQRcode()
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
2021-10-09 19:23:24 +02:00
|
|
|
/**
|
|
|
|
* Get a QR code image resource from backend
|
|
|
|
*/
|
2020-11-02 13:39:43 +01:00
|
|
|
async getQRcode () {
|
|
|
|
|
2021-11-07 21:57:22 +01:00
|
|
|
const { data } = await this.axios.get('/api/v1/twofaccounts/' + this.$route.params.twofaccountId + '/qrcode')
|
2020-11-02 13:39:43 +01:00
|
|
|
this.qrcode = data.qrcode
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|