add email to qrcode modal

Co-authored-by: Hamidreza Ghavami <hamid.r.gh.1998@gmail.com>
This commit is contained in:
Alireza Ahmadi
2023-05-15 15:32:45 +02:00
parent 6d453fa91b
commit c8c0bbc455
2 changed files with 8 additions and 2 deletions

View File

@@ -4,6 +4,9 @@
:class="themeSwitcher.darkCardClass"
:footer="null"
width="300px">
<a-tag v-if="qrModal.clientName" color="orange" style="margin-bottom: 10px;display: block;text-align: center;">
{{ i18n "pages.inbounds.email" }}: "[[ qrModal.clientName ]]"
</a-tag>
<a-tag color="green" style="margin-bottom: 10px;display: block;text-align: center;" >{{ i18n "pages.inbounds.clickOnQRcode" }}</a-tag>
<canvas @click="copyToClipboard()" id="qrCode" style="width: 100%; height: 100%;"></canvas>
</a-modal>
@@ -16,14 +19,16 @@
inbound: new Inbound(),
dbInbound: new DBInbound(),
copyText: '',
clientName: null,
qrcode: null,
clipboard: null,
visible: false,
show: function (title='', content='', dbInbound=new DBInbound(), copyText='') {
show: function (title='', content='', dbInbound=new DBInbound(), copyText='', clientName = null) {
this.title = title;
this.content = content;
this.dbInbound = dbInbound;
this.inbound = dbInbound.toInbound();
this.clientName = clientName;
if (ObjectUtil.isEmpty(copyText)) {
this.copyText = content;
} else {
@@ -48,6 +53,7 @@
};
const qrModalApp = new Vue({
delimiters: ['[[', ']]'],
el: '#qrcode-modal',
data: {
qrModal: qrModal,

View File

@@ -694,7 +694,7 @@
},
showQrcode(dbInbound, clientIndex) {
const link = dbInbound.genLink(clientIndex);
qrModal.show('{{ i18n "qrCode"}}', link, dbInbound);
qrModal.show('{{ i18n "qrCode"}}', link, dbInbound, '', clientName);
},
showInfo(dbInbound, index) {
infoModal.show(dbInbound, index);