From c8c0bbc455c0b65e26e15313055b85735fefbc62 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Mon, 15 May 2023 15:32:45 +0200 Subject: [PATCH] add email to qrcode modal Co-authored-by: Hamidreza Ghavami --- web/html/common/qrcode_modal.html | 8 +++++++- web/html/xui/inbounds.html | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html index 43aa8cfe..49d03c4f 100644 --- a/web/html/common/qrcode_modal.html +++ b/web/html/common/qrcode_modal.html @@ -4,6 +4,9 @@ :class="themeSwitcher.darkCardClass" :footer="null" width="300px"> + + {{ i18n "pages.inbounds.email" }}: "[[ qrModal.clientName ]]" + {{ i18n "pages.inbounds.clickOnQRcode" }} @@ -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, diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 78ce050c..b69d36b5 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -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);