mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-18 14:55:49 +00:00
add email to qrcode modal
Co-authored-by: Hamidreza Ghavami <hamid.r.gh.1998@gmail.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user