add methods 'showQrCodeButton', add data 'showQrcode'

This commit is contained in:
ogerly 2022-04-21 17:47:55 +02:00
parent b2623cc83e
commit 1823bc3611

View File

@ -4,10 +4,10 @@
<b-card class="p-0 gradido-custom-background">
<div class="h3 mb-4">{{ $t('gdd_per_link.created') }}</div>
<clipboard-copy :text="link" />
<clipboard-copy :text="link" @show-qr-code-button="showQrCodeButton" />
<div class="text-center">
<figure-qr-code :text="link" />
<figure-qr-code v-if="showQrcode" :text="link" />
<b-button variant="success" @click="$emit('on-reset')" class="mt-4">
{{ $t('form.close') }}
@ -33,6 +33,16 @@ export default {
required: true,
},
},
data() {
return {
showQrcode: false,
}
},
methods: {
showQrCodeButton() {
this.showQrcode = !this.showQrcode
},
},
computed: {
link() {
return `${window.location.origin}/redeem/${this.code}`