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:
authorMHSanaei <mc.sanaei@gmail.com>2023-02-10 18:19:31 +0300
committerMHSanaei <mc.sanaei@gmail.com>2023-02-10 18:19:31 +0300
commitc1980277e1dad7155034aa55e1a95c7b6401e0e4 (patch)
tree88e90d327c4d68d002e31f58094d2aea76310d8d /web/html/common
parent145015bf4192b5473b74cd7aafc57a39e8858f32 (diff)
fa,zh bug fixed - qrcode for trojan added
Diffstat (limited to 'web/html/common')
-rw-r--r--web/html/common/qrcode_modal.html15
1 files changed, 14 insertions, 1 deletions
diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html
index c80f8a0e..771f3241 100644
--- a/web/html/common/qrcode_modal.html
+++ b/web/html/common/qrcode_modal.html
@@ -3,7 +3,7 @@
:closable="true" width="300px" :ok-text="qrModal.okText"
cancel-text='{{ i18n "close" }}' :ok-button-props="{attrs:{id:'qr-modal-ok-btn'}}">
<a-tag color="green" style="margin-bottom: 10px;display: block;text-align: center;" >click on QR Code to Copy</a-tag>
- <canvas v-if="qrModal.inbound.protocol != Protocols.VMESS && qrModal.inbound.protocol != Protocols.VLESS" id="qrCode" style="width: 100%; height: 100%;"></canvas>
+ <canvas v-if="qrModal.inbound.protocol != Protocols.VMESS && qrModal.inbound.protocol != Protocols.VLESS && qrModal.inbound.protocol != Protocols.TROJAN" id="qrCode" style="width: 100%; height: 100%;"></canvas>
<template v-if="qrModal.inbound.protocol === Protocols.VMESS" v-for="(vmess, index) in qrModal.inbound.settings.vmesses">
<a-tag color="red" style="margin-bottom: 10px;display: block;text-align: center;" v-text="vmess.email"></a-tag>
@@ -16,6 +16,12 @@
<canvas @click="copyTextToClipboard(`qrCode-vless-${vless.id}`,index)" :id="`qrCode-vless-${vless.id}`" style="width: 100%; height: 100%;"></canvas>
<a-divider style="height: 2px; background-color: #7e7e7e" />
</template>
+
+ <template v-if="qrModal.inbound.protocol === Protocols.TROJAN" v-for="(trojan, index) in qrModal.inbound.settings.trojans">
+ <a-tag color="red" style="margin-bottom: 10px;display: block;text-align: center;" v-text="trojan.email"></a-tag>
+ <canvas @click="copyTextToClipboard(`qrCode-trojan-${trojan.password}`,index)" :id="`qrCode-trojan-${trojan.password}`" style="width: 100%; height: 100%;"></canvas>
+ <a-divider style="height: 2px; background-color: #7e7e7e" />
+ </template>
</a-modal>
<script>
@@ -110,6 +116,13 @@
this.setQrCode("qrCode-vless-" + vlesses[index].id ,index)
}
break;
+ case Protocols.TROJAN:
+ trojans = qrModal.inbound.settings.trojans
+
+ for (const index in trojans) {
+ this.setQrCode("qrCode-trojan-" + trojans[index].password ,index)
+ }
+ break;
default: return null;
}