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
path: root/web/html
diff options
context:
space:
mode:
Diffstat (limited to 'web/html')
-rw-r--r--web/html/common/qrcode_modal.html72
-rw-r--r--web/html/xui/form/protocol/trojan.html20
-rw-r--r--web/html/xui/form/protocol/vless.html18
-rw-r--r--web/html/xui/form/protocol/vmess.html6
-rw-r--r--web/html/xui/form/sniffing.html2
-rw-r--r--web/html/xui/form/stream/stream_grpc.html2
-rw-r--r--web/html/xui/form/stream/stream_http.html2
-rw-r--r--web/html/xui/form/stream/stream_kcp.html14
-rw-r--r--web/html/xui/form/stream/stream_tcp.html12
-rw-r--r--web/html/xui/form/stream/stream_ws.html2
-rw-r--r--web/html/xui/form/tls_settings.html12
-rw-r--r--web/html/xui/inbound_info_modal.html118
-rw-r--r--web/html/xui/inbounds.html116
-rw-r--r--web/html/xui/inbounds_client_row.html18
14 files changed, 241 insertions, 173 deletions
diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html
index 771f3241..84291829 100644
--- a/web/html/common/qrcode_modal.html
+++ b/web/html/common/qrcode_modal.html
@@ -2,26 +2,7 @@
<a-modal id="qrcode-modal" v-model="qrModal.visible" :title="qrModal.title"
: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 && 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>
- <canvas @click="copyTextToClipboard(`qrCode-vmess-${vmess.id}`,index)" :id="`qrCode-vmess-${vmess.id}`" style="width: 100%; height: 100%;"></canvas>
- <a-divider style="height: 2px; background-color: #7e7e7e" />
- </template>
-
- <template v-if="qrModal.inbound.protocol === Protocols.VLESS" v-for="(vless, index) in qrModal.inbound.settings.vlesses">
- <a-tag color="red" style="margin-bottom: 10px;display: block;text-align: center;" v-text="vless.email"></a-tag>
- <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>
+ <canvas id="qrCode" style="width: 100%; height: 100%;"></canvas>
</a-modal>
<script>
@@ -76,57 +57,6 @@
data: {
qrModal: qrModal,
},
- methods: {
- setQrCode(elmentId,index) {
- content = qrModal.inbound.genLink(qrModal.dbInbound.address,qrModal.dbInbound.remark,index)
-
- new QRious({
- element: document.querySelector('#'+elmentId),
- size: 260,
- value: content,
- });
- },
- copyTextToClipboard(elmentId,index) {
- link = qrModal.inbound.genLink(qrModal.dbInbound.address,qrModal.dbInbound.remark,index)
- this.qrModal.copyText = link
-
- this.qrModal.clipboard = new ClipboardJS('#' + elmentId, {
- text: () => link,
- });
- this.qrModal.clipboard.on('success', () => {
- app.$message.success('{{ i18n "copied" }}')
- this.qrModal.clipboard.destroy();
- });
-
-
- }
- },
- updated() {
- switch (qrModal.inbound.protocol) {
- case Protocols.VMESS:
- vmesses = qrModal.inbound.settings.vmesses
- for (const index in vmesses) {
- this.setQrCode("qrCode-vmess-" + vmesses[index].id ,index)
- }
- break;
- case Protocols.VLESS:
- vlesses = qrModal.inbound.settings.vlesses
-
- for (const index in vlesses) {
- 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;
- }
-
- }
});
</script>
diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html
index 69c67052..fa5a2032 100644
--- a/web/html/xui/form/protocol/trojan.html
+++ b/web/html/xui/form/protocol/trojan.html
@@ -12,7 +12,7 @@
Email
<a-tooltip>
<template slot="title">
- The email must be completely unique
+ The Email Must Be Completely Unique
</template>
<!--Renew Svg Icon-->
<svg
@@ -23,10 +23,10 @@
<a-input v-model.trim="trojan.email"></a-input>
</a-form-item>
</a-form>
- <a-form-item label="password">
+ <a-form-item label="Password">
<a-input v-model.trim="trojan.password"></a-input>
</a-form-item>
- <a-form-item v-if="inbound.xtls" label="flow">
+ <a-form-item v-if="inbound.xtls" label="Flow">
<a-select v-model="inbound.settings.trojans[index].flow" style="width: 150px">
<a-select-option value="" selected>none</a-select-option>
<a-select-option v-for="key in XTLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option>
@@ -60,7 +60,7 @@
<a-form layout="inline">
<a-tooltip v-if="trojan._totalGB > 0">
<template slot="title">
- reset traffic
+ {{ i18n "pages.inbounds.resetTraffic" }}
</template>
<span style="color: #FF4D4F">
<a-icon type="delete" @click="resetClientTraffic(trojan,$event)"></a-icon>
@@ -104,7 +104,7 @@
</a-form>
</a-form>
<a-form layout="inline">
- <a-form-item label="fallbacks">
+ <a-form-item label="Fallbacks">
<a-row>
<a-button type="primary" size="small"
@click="inbound.settings.addTrojanFallback()">
@@ -121,19 +121,19 @@
<a-icon type="delete" @click="() => inbound.settings.delTrojanFallback(index)"
style="color: rgb(255, 77, 79);cursor: pointer;"/>
</a-divider>
-<a-form-item label="name">
+<a-form-item label="Name">
<a-input v-model="fallback.name"></a-input>
</a-form-item>
-<a-form-item label="alpn">
+<a-form-item label="Alpn">
<a-input v-model="fallback.alpn"></a-input>
</a-form-item>
-<a-form-item label="path">
+<a-form-item label="Path">
<a-input v-model="fallback.path"></a-input>
</a-form-item>
-<a-form-item label="dest">
+<a-form-item label="Dest">
<a-input v-model="fallback.dest"></a-input>
</a-form-item>
-<a-form-item label="xver">
+<a-form-item label="xVer">
<a-input type="number" v-model.number="fallback.xver"></a-input>
</a-form-item>
<a-divider v-if="inbound.settings.fallbacks.length - 1 === index"/>
diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html
index e858906e..5d56fdd3 100644
--- a/web/html/xui/form/protocol/vless.html
+++ b/web/html/xui/form/protocol/vless.html
@@ -12,7 +12,7 @@
Email
<a-tooltip>
<template slot="title">
- The email must be completely unique
+ The Email Must Be Completely Unique
</template>
<!--Renew Svg Icon-->
<svg
@@ -23,7 +23,7 @@
<a-input v-model.trim="vless.email"></a-input>
</a-form-item>
</a-form>
- <a-form-item label="id">
+ <a-form-item label="ID">
<a-input v-model.trim="vless.id"></a-input>
</a-form-item>
<a-form-item v-if="inbound.xtls" label="flow">
@@ -71,7 +71,7 @@
<a-form layout="inline">
<a-tooltip v-if="vless._totalGB > 0">
<template slot="title">
- reset traffic
+ {{ i18n "pages.inbounds.resetTraffic" }}
</template>
<span style="color: #FF4D4F">
<a-icon type="delete" @click="resetClientTraffic(vless,$event)"></a-icon>
@@ -118,7 +118,7 @@
</a-form>
<a-form layout="inline">
- <a-form-item label="fallbacks">
+ <a-form-item label="Fallbacks">
<a-row>
<a-button type="primary" size="small"
@click="inbound.settings.addFallback()">
@@ -135,19 +135,19 @@
<a-icon type="delete" @click="() => inbound.settings.delFallback(index)"
style="color: rgb(255, 77, 79);cursor: pointer;"/>
</a-divider>
- <a-form-item label="name">
+ <a-form-item label="Name">
<a-input v-model="fallback.name"></a-input>
</a-form-item>
- <a-form-item label="alpn">
+ <a-form-item label="Alpn">
<a-input v-model="fallback.alpn"></a-input>
</a-form-item>
- <a-form-item label="path">
+ <a-form-item label="Path">
<a-input v-model="fallback.path"></a-input>
</a-form-item>
- <a-form-item label="dest">
+ <a-form-item label="Dest">
<a-input v-model="fallback.dest"></a-input>
</a-form-item>
- <a-form-item label="xver">
+ <a-form-item label="xVer">
<a-input type="number" v-model.number="fallback.xver"></a-input>
</a-form-item>
<a-divider v-if="inbound.settings.fallbacks.length - 1 === index"/>
diff --git a/web/html/xui/form/protocol/vmess.html b/web/html/xui/form/protocol/vmess.html
index df532767..9ed444c6 100644
--- a/web/html/xui/form/protocol/vmess.html
+++ b/web/html/xui/form/protocol/vmess.html
@@ -11,7 +11,7 @@
Email
<a-tooltip>
<template slot="title">
- The email must be completely unique
+ The Email Must Be Completely Unique
</template>
<!--Renew Svg Icon-->
<svg
@@ -22,7 +22,7 @@
<a-input v-model.trim="vmess.email"></a-input>
</a-form-item>
</a-form>
- <a-form-item label="id">
+ <a-form-item label="ID">
<a-input v-model.trim="vmess.id"></a-input>
</a-form-item>
<a-form-item label='{{ i18n "additional" }} ID'>
@@ -56,7 +56,7 @@
<a-form layout="inline">
<a-tooltip v-if="vmess._totalGB > 0">
<template slot="title">
- reset traffic
+ {{ i18n "pages.inbounds.resetTraffic" }}
</template>
<span style="color: #FF4D4F">
<a-icon type="delete" @click="resetClientTraffic(vmess,$event)"></a-icon>
diff --git a/web/html/xui/form/sniffing.html b/web/html/xui/form/sniffing.html
index 838c92fc..6bfab7c1 100644
--- a/web/html/xui/form/sniffing.html
+++ b/web/html/xui/form/sniffing.html
@@ -2,7 +2,7 @@
<a-form layout="inline">
<a-form-item>
<span slot="label">
- sniffing
+ Sniffing
<a-tooltip>
<template slot="title">
<span >{{ i18n "pages.inbounds.noRecommendKeepDefault" }}</span>
diff --git a/web/html/xui/form/stream/stream_grpc.html b/web/html/xui/form/stream/stream_grpc.html
index 205a4c84..4e57d225 100644
--- a/web/html/xui/form/stream/stream_grpc.html
+++ b/web/html/xui/form/stream/stream_grpc.html
@@ -1,6 +1,6 @@
{{define "form/streamGRPC"}}
<a-form layout="inline">
- <a-form-item label="serviceName">
+ <a-form-item label="ServiceName">
<a-input v-model.trim="inbound.stream.grpc.serviceName"></a-input>
</a-form-item>
</a-form>
diff --git a/web/html/xui/form/stream/stream_http.html b/web/html/xui/form/stream/stream_http.html
index ad30c45a..57574ce5 100644
--- a/web/html/xui/form/stream/stream_http.html
+++ b/web/html/xui/form/stream/stream_http.html
@@ -3,7 +3,7 @@
<a-form-item label='{{ i18n "path" }}'>
<a-input v-model.trim="inbound.stream.http.path"></a-input>
</a-form-item>
- <a-form-item label="host">
+ <a-form-item label="Host">
<a-row v-for="(host, index) in inbound.stream.http.host">
<a-input v-model.trim="inbound.stream.http.host[index]"></a-input>
</a-row>
diff --git a/web/html/xui/form/stream/stream_kcp.html b/web/html/xui/form/stream/stream_kcp.html
index ff14d5b7..f0402909 100644
--- a/web/html/xui/form/stream/stream_kcp.html
+++ b/web/html/xui/form/stream/stream_kcp.html
@@ -13,25 +13,25 @@
<a-form-item label='{{ i18n "password" }}'>
<a-input v-model.number="inbound.stream.kcp.seed"></a-input>
</a-form-item>
- <a-form-item label="mtu">
+ <a-form-item label="MTU">
<a-input type="number" v-model.number="inbound.stream.kcp.mtu"></a-input>
</a-form-item>
- <a-form-item label="tti (ms)">
+ <a-form-item label="TTI (ms)">
<a-input type="number" v-model.number="inbound.stream.kcp.tti"></a-input>
</a-form-item>
- <a-form-item label="uplink capacity (MB/S)">
+ <a-form-item label="Uplink Capacity (MB/S)">
<a-input type="number" v-model.number="inbound.stream.kcp.upCap"></a-input>
</a-form-item>
- <a-form-item label="downlink capacity (MB/S)">
+ <a-form-item label="Downlink Capacity (MB/S)">
<a-input type="number" v-model.number="inbound.stream.kcp.downCap"></a-input>
</a-form-item>
- <a-form-item label="congestion">
+ <a-form-item label="Congestion">
<a-switch v-model="inbound.stream.kcp.congestion"></a-switch>
</a-form-item>
- <a-form-item label="read buffer size (MB)">
+ <a-form-item label="Read Buffer Size (MB)">
<a-input type="number" v-model.number="inbound.stream.kcp.readBuffer"></a-input>
</a-form-item>
- <a-form-item label="write buffer size (MB)">
+ <a-form-item label="Write Buffer Size (MB)">
<a-input type="number" v-model.number="inbound.stream.kcp.writeBuffer"></a-input>
</a-form-item>
</a-form>
diff --git a/web/html/xui/form/stream/stream_tcp.html b/web/html/xui/form/stream/stream_tcp.html
index fc19506d..b03b3015 100644
--- a/web/html/xui/form/stream/stream_tcp.html
+++ b/web/html/xui/form/stream/stream_tcp.html
@@ -1,19 +1,19 @@
{{define "form/streamTCP"}}
<!-- tcp type -->
<a-form layout="inline">
- <a-form-item label="acceptProxyProtocol">
+ <a-form-item label="AcceptProxyProtocol">
<a-switch v-model="inbound.stream.tcp.acceptProxyProtocol"></a-switch>
</a-form-item>
- <a-form-item label="http camouflage">
+ <a-form-item label="HTTP Camouflage">
<a-switch
- :checked="inbound.stream.tcp.type === 'http'"
- @change="checked => inbound.stream.tcp.type = checked ? 'http' : 'none'">
+ :checked="inbound.stream.tcp.type === 'HTTP'"
+ @change="checked => inbound.stream.tcp.type = checked ? 'HTTP' : 'none'">
</a-switch>
</a-form-item>
</a-form>
<!-- tcp request -->
-<a-form v-if="inbound.stream.tcp.type === 'http'"
+<a-form v-if="inbound.stream.tcp.type === 'HTTP'"
layout="inline">
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestVersion" }}'>
<a-input v-model.trim="inbound.stream.tcp.request.version"></a-input>
@@ -50,7 +50,7 @@
</a-form>
<!-- tcp response -->
-<a-form v-if="inbound.stream.tcp.type === 'http'"
+<a-form v-if="inbound.stream.tcp.type === 'HTTP'"
layout="inline">
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.responseVersion" }}'>
<a-input v-model.trim="inbound.stream.tcp.response.version"></a-input>
diff --git a/web/html/xui/form/stream/stream_ws.html b/web/html/xui/form/stream/stream_ws.html
index 46d6f7a3..5b49ec88 100644
--- a/web/html/xui/form/stream/stream_ws.html
+++ b/web/html/xui/form/stream/stream_ws.html
@@ -1,6 +1,6 @@
{{define "form/streamWS"}}
<a-form layout="inline">
- <a-form-item label="acceptProxyProtocol">
+ <a-form-item label="AcceptProxyProtocol">
<a-switch v-model="inbound.stream.ws.acceptProxyProtocol"></a-switch>
</a-form-item>
</a-form>
diff --git a/web/html/xui/form/tls_settings.html b/web/html/xui/form/tls_settings.html
index 06dbaa4f..ea3216e7 100644
--- a/web/html/xui/form/tls_settings.html
+++ b/web/html/xui/form/tls_settings.html
@@ -1,28 +1,28 @@
{{define "form/tlsSettings"}}
<!-- tls enable -->
<a-form layout="inline" v-if="inbound.canSetTls()">
- <a-form-item label="tls">
+ <a-form-item label="TLS">
<a-switch v-model="inbound.tls">
</a-switch>
</a-form-item>
- <a-form-item v-if="inbound.canEnableXTls()" label="xtls">
+ <a-form-item v-if="inbound.canEnableXTls()" label="XTLS">
<a-switch v-model="inbound.xtls"></a-switch>
</a-form-item>
</a-form>
<!-- tls settings -->
<a-form v-if="inbound.tls || inbound.xtls"layout="inline">
- <a-form-item label="minVersion">
+ <a-form-item label="MinVersion">
<a-select v-model="inbound.stream.tls.minVersion" style="width: 60px">
<a-select-option v-for="key in TLS_VERSION_OPTION" :value="key">[[ key ]]</a-select-option>
</a-select>
</a-form-item>
- <a-form-item label="maxVersion">
+ <a-form-item label="MaxVersion">
<a-select v-model="inbound.stream.tls.maxVersion" style="width: 60px">
<a-select-option v-for="key in TLS_VERSION_OPTION" :value="key">[[ key ]]</a-select-option>
</a-select>
</a-form-item>
- <a-form-item label="cipherSuites">
+ <a-form-item label="CipherSuites">
<a-select v-model="inbound.stream.tls.cipherSuites" style="width: 300px">
<a-select-option value="">auto</a-select-option>
<a-select-option v-for="key in TLS_CIPHER_OPTION" :value="key">[[ key ]]</a-select-option>
@@ -31,7 +31,7 @@
<a-form-item label='{{ i18n "domainName" }}'>
<a-input v-model.trim="inbound.stream.tls.server"></a-input>
</a-form-item>
- <a-form-item label="alpn">
+ <a-form-item label="Alpn">
<a-input v-model.trim="inbound.stream.tls.alpn"></a-input>
</a-form-item>
<a-form-item label='{{ i18n "certificate" }}'>
diff --git a/web/html/xui/inbound_info_modal.html b/web/html/xui/inbound_info_modal.html
index bcd2b25f..14809ab7 100644
--- a/web/html/xui/inbound_info_modal.html
+++ b/web/html/xui/inbound_info_modal.html
@@ -1,9 +1,65 @@
{{define "inboundInfoModal"}}
-{{template "component/inboundInfo"}}
-<a-modal id="inbound-info-modal" v-model="infoModal.visible" title='{{ i18n "pages.inbounds.details"}}' @ok="infoModal.ok"
- :closable="true" :mask-closable="true"
- ok-text='{{ i18n "pages.inbounds.copyLink"}}' cancel-text='{{ i18n "close" }}' :ok-button-props="infoModal.okBtnPros">
- <inbound-info :db-inbound="dbInbound" :inbound="inbound"></inbound-info>
+<a-modal id="inbound-info-modal" v-model="infoModal.visible" title='{{ i18n "pages.inbounds.details"}}'
+ :closable="true"
+ :mask-closable="true"
+ :footer="null"
+ >
+ <table style="margin-bottom: 10px; width: 100%;">
+ <tr><td>
+ <table>
+ <tr><td>{{ i18n "protocol" }}</td><td><a-tag color="green">[[ dbInbound.protocol ]]</a-tag></td></tr>
+ <tr><td>{{ i18n "pages.inbounds.address" }}</td><td><a-tag color="blue">[[ dbInbound.address ]]</a-tag></td></tr>
+ <tr><td>{{ i18n "pages.inbounds.port" }}</td><td><a-tag color="green">[[ dbInbound.port ]]</a-tag></td></tr>
+ </table>
+ </td>
+ <td v-if="dbInbound.isVMess || dbInbound.isVLess || dbInbound.isTrojan || dbInbound.isSS">
+ <table>
+ <tr>
+ <td>{{ i18n "transmission" }}</td><td><a-tag color="green">[[ inbound.network ]]</a-tag></td>
+ </tr>
+ <template v-if="inbound.isTcp || inbound.isWs || inbound.isH2">
+ <tr v-if="inbound.host"><td>{{ i18n "host" }}</td><td><a-tag color="green">[[ inbound.host ]]</a-tag></td></tr>
+ <tr v-else><td>{{ i18n "host" }}</td><td><a-tag color="orange">{{ i18n "none" }}</a-tag></td></tr>
+
+ <tr v-if="inbound.path"><td>{{ i18n "path" }}</td><td><a-tag color="green">[[ inbound.path ]]</a-tag></td></tr>
+ <tr v-else><td>{{ i18n "path" }}</td><td><a-tag color="orange">{{ i18n "none" }}</a-tag></td></tr>
+ </template>
+
+ <template v-if="inbound.isQuic">
+ <tr><td>quic {{ i18n "encryption" }}</td><td><a-tag color="green">[[ inbound.quicSecurity ]]</a-tag></td></tr>
+ <tr><td>quic {{ i18n "password" }}</td><td><a-tag color="green">[[ inbound.quicKey ]]</a-tag></td></tr>
+ <tr><td>quic {{ i18n "camouflage" }}</td><td><a-tag color="green">[[ inbound.quicType ]]</a-tag></td></tr>
+ </template>
+
+ <template v-if="inbound.isKcp">
+ <tr><td>kcp {{ i18n "encryption" }}</td><td><a-tag color="green">[[ inbound.kcpType ]]</a-tag></td></tr>
+ <tr><td>kcp {{ i18n "password" }}</td><td><a-tag color="green">[[ inbound.kcpSeed ]]</a-tag></td></tr>
+ </template>
+
+ <template v-if="inbound.isGrpc">
+ <tr><td>grpc serviceName</td><td><a-tag color="green">[[ inbound.serviceName ]]</a-tag></td></tr>
+ </template>
+ </table>
+ </td></tr>
+ <tr colspan="2">
+ <td v-if="inbound.tls">
+ tls: <a-tag color="green">{{ i18n "enabled" }}</a-tag><br />
+ tls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
+ </td>
+ <td v-else-if="inbound.xtls">
+ xtls: <a-tag color="green">{{ i18n "enabled" }}</a-tag><br />
+ xtls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
+ </td>
+ <td v-else>tls: <a-tag color="red">{{ i18n "disabled" }}</a-tag>
+ </td>
+ </tr>
+ </table>
+ <a-divider>{{ i18n "pages.inbounds.client" }}</a-divider>
+ <template v-if="dbInbound.hasLink()">
+ <p>Client URL:</p>
+ <p>[[ infoModal.link ]]</p>
+ <button class="btn" id="copy-url-link"><a-icon type="snippets"></a-icon>{{ i18n "copy" }}</button>
+ </template>
</a-modal>
<script>
@@ -12,31 +68,22 @@
inbound: new Inbound(),
dbInbound: new DBInbound(),
clipboard: null,
- okBtnPros: {
- attrs: {
- id: "inbound-info-modal-ok-btn",
- style: "",
- },
- },
- show(dbInbound) {
+ link: null,
+ index: 0,
+ show(dbInbound, index=0) {
+ this.index = index;
this.inbound = dbInbound.toInbound();
this.dbInbound = new DBInbound(dbInbound);
+ this.link = dbInbound.genLink(index);
this.visible = true;
-
- if (dbInbound.hasLink()) {
- this.okBtnPros.attrs.style = "";
- } else {
- this.okBtnPros.attrs.style = "display: none";
- }
-
- if (this.clipboard == null) {
- infoModalApp.$nextTick(() => {
- this.clipboard = new ClipboardJS(`#${this.okBtnPros.attrs.id}`, {
- text: () => this.dbInbound.genLink(),
+ infoModalApp.$nextTick(() => {
+ if (this.clipboard === null) {
+ this.clipboard = new ClipboardJS('#copy-url-link', {
+ text: () => this.link,
});
this.clipboard.on('success', () => app.$message.success('{{ i18n "copySuccess" }}'));
- });
- }
+ }
+ });
},
close() {
infoModal.visible = false;
@@ -55,6 +102,27 @@
return this.infoModal.inbound;
}
},
+ methods: {
+ setQrCode(elmentId,index) {
+ content = infoModal.inbound.genLink(infoModal.dbInbound.address,infoModal.dbInbound.remark,index)
+
+ new QRious({
+ element: document.querySelector('#'+elmentId),
+ size: 260,
+ value: content,
+ });
+ },
+ copyTextToClipboard(elmentId,content) {
+ this.infoModal.clipboard = new ClipboardJS('#' + elmentId, {
+ text: () => content,
+ });
+ this.infoModal.clipboard.on('success', () => {
+ app.$message.success('{{ i18n "copySuccess" }}')
+ this.infoModal.clipboard.destroy();
+ });
+ }
+ },
+
});
</script>
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html
index 8d295121..4cca8aac 100644
--- a/web/html/xui/inbounds.html
+++ b/web/html/xui/inbounds.html
@@ -46,10 +46,10 @@
<div slot="title">
<a-button type="primary" @click="openAddInbound">Add Inbound</a-button>
</div>
-<!-- <a-input v-model="searchKey" placeholder="search" autofocus style="max-width: 300px"></a-input>-->
+ <a-input v-model.lazy="searchKey" placeholder="{{ i18n "search" }}" autofocus style="max-width: 300px"></a-input>
<a-table :columns="columns" :row-key="dbInbound => dbInbound.id"
- :data-source="dbInbounds"
- :loading="spinning" :scroll="{ x: 1500 }"
+ :data-source="searchedInbounds"
+ :loading="spinning" :scroll="{ x: 1300 }"
:pagination="false"
style="margin-top: 20px"
@change="() => getDBInbounds()">
@@ -58,7 +58,7 @@
<a-dropdown :trigger="['click']">
<a @click="e => e.preventDefault()">{{ i18n "pages.inbounds.operate" }}</a>
<a-menu slot="overlay" @click="a => clickAction(a, dbInbound)">
- <a-menu-item v-if="dbInbound.hasLink()" key="qrcode">
+ <a-menu-item v-if="dbInbound.isSS" key="qrcode">
<a-icon type="qrcode"></a-icon>
{{ i18n "qrCode" }}
</a-menu-item>
@@ -88,9 +88,6 @@
</template>
<a-tag v-else color="green">{{ i18n "unlimited" }}</a-tag>
</template>
- <template slot="settings" slot-scope="text, dbInbound">
- <a-button type="link" @click="showInfo(dbInbound)">{{ i18n "check" }}</a-button>
- </template>
<template slot="stream" slot-scope="text, dbInbound, index">
<template v-if="dbInbound.isVMess || dbInbound.isVLess || dbInbound.isTrojan || dbInbound.isSS">
<a-tag color="green">[[ inbounds[index].stream.network ]]</a-tag>
@@ -115,13 +112,31 @@
</template>
<template slot="expandedRowRender" slot-scope="record">
<a-table
- v-if="(record.protocol === Protocols.VLESS) || (record.protocol === Protocols.VMESS) || (record.protocol === Protocols.TROJAN)"
+ v-if="(record.protocol === Protocols.VLESS) || (record.protocol === Protocols.VMESS)"
:row-key="client => client.id"
:columns="innerColumns"
:data-source="getInboundClients(record)"
:pagination="false"
>
- {{template "form/client_row"}}
+ {{template "client_row"}}
+ </a-table>
+ <a-table
+ v-else-if="record.protocol === Protocols.TROJAN"
+ :row-key="client => client.id"
+ :columns="innerTrojanColumns"
+ :data-source="getInboundClients(record)"
+ :pagination="false"
+ >
+ {{template "client_row"}}
+ </a-table>
+ <a-table
+ v-else
+ :row-key="client => client.id"
+ :columns="innerOneColumns"
+ :data-source="record"
+ :pagination="false"
+ >
+ {{template "client_row"}}
</a-table>
</template>
</a-table>
@@ -152,29 +167,24 @@
}, {
title: '{{ i18n "pages.inbounds.remark" }}',
align: 'center',
- width: 100,
+ width: 60,
dataIndex: "remark",
}, {
title: '{{ i18n "pages.inbounds.protocol" }}',
align: 'center',
- width: 60,
+ width: 40,
scopedSlots: { customRender: 'protocol' },
}, {
title: '{{ i18n "pages.inbounds.port" }}',
align: 'center',
dataIndex: "port",
- width: 60,
+ width: 40,
}, {
title: '{{ i18n "pages.inbounds.traffic" }}↑|↓',
align: 'center',
width: 150,
scopedSlots: { customRender: 'traffic' },
- }, {
- title: '{{ i18n "pages.inbounds.details" }}',
- align: 'center',
- width: 40,
- scopedSlots: { customRender: 'settings' },
- }, {
+ },{
title: '{{ i18n "pages.inbounds.transportConfig" }}',
align: 'center',
width: 60,
@@ -187,10 +197,23 @@
}];
const innerColumns = [
- { title: '{{ i18n "pages.inbounds.client" }}', width: 80, scopedSlots: { customRender: 'client' } },
- { title: '{{ i18n "pages.inbounds.traffic" }}', width: 100, scopedSlots: { customRender: 'traffic' } },
- { title: '{{ i18n "pages.inbounds.expireDate" }}', width: 80, scopedSlots: { customRender: 'expiryTime' } },
- { title: '{{ i18n "pages.inbounds.uid" }}', width: 150, dataIndex: "id" },
+ { title: '', width: 50, scopedSlots: { customRender: 'action