Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlireza Ahmadi <alireza7@gmail.com>2023-12-08 20:45:21 +0300
committerAlireza Ahmadi <alireza7@gmail.com>2023-12-08 20:45:21 +0300
commit5fbf8f0d535b131ad6de22a0d1dda0f2167d5ee0 (patch)
treec2da678a5d851fe5349644468427c5ba45e24d3d /web/html/common
parentbcc897640e68f7a731d39bee04c8930d7d7196c6 (diff)
Expand multiDomain to externalProxy #1300
Diffstat (limited to 'web/html/common')
-rw-r--r--web/html/common/qrcode_modal.html26
1 files changed, 6 insertions, 20 deletions
diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html
index 85ada3d4..0df369ff 100644
--- a/web/html/common/qrcode_modal.html
+++ b/web/html/common/qrcode_modal.html
@@ -22,39 +22,25 @@
const qrModal = {
title: '',
- clientIndex: 0,
- inbound: new Inbound(),
dbInbound: new DBInbound(),
client: null,
qrcodes: [],
clipboard: null,
visible: false,
subId: '',
- show: function (title = '', dbInbound = new DBInbound(), clientIndex = 0) {
+ show: function (title = '', dbInbound, client) {
this.title = title;
- this.clientIndex = clientIndex;
this.dbInbound = dbInbound;
this.inbound = dbInbound.toInbound();
- settings = JSON.parse(this.inbound.settings);
- this.client = settings.clients[clientIndex];
- remark = [this.dbInbound.remark, ( this.client ? this.client.email : '')].filter(Boolean).join('-');
- address = this.dbInbound.address;
+ this.client = client;
this.subId = '';
this.qrcodes = [];
- if (this.inbound.tls && !ObjectUtil.isArrEmpty(this.inbound.stream.tls.settings.domains)) {
- this.inbound.stream.tls.settings.domains.forEach((domain) => {
- remarkText = [remark, domain.remark].filter(Boolean).join('-');
- this.qrcodes.push({
- remark: remarkText,
- link: this.inbound.genLink(domain.domain, remarkText, clientIndex)
- });
- });
- } else {
+ this.inbound.genAllLinks(this.dbInbound.remark, client).forEach(l => {
this.qrcodes.push({
- remark: remark,
- link: this.inbound.genLink(address, remark, clientIndex)
+ remark: l.remark,
+ link: l.link
});
- }
+ });
this.visible = true;
},
close: function () {