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 <ho3ein.sanaei@gmail.com>2024-01-26 21:37:15 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2024-01-27 00:02:19 +0300
commit9fba92d879767394535f70ba83f0a58d6b063a7d (patch)
treef0d6a8cd5d70c5127c9e992f884e39c91eeb9676 /web/html/xui/inbounds.html
parentdaa43540477e18ae5c6e19e887733b793c17ad72 (diff)
v2.1.2
revert #1650 #1661 #1664 #1670 made panel full of bug
Diffstat (limited to 'web/html/xui/inbounds.html')
-rw-r--r--web/html/xui/inbounds.html82
1 files changed, 16 insertions, 66 deletions
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html
index 2707fc42..c986e3fd 100644
--- a/web/html/xui/inbounds.html
+++ b/web/html/xui/inbounds.html
@@ -145,10 +145,6 @@
<a-icon type="rest"></a-icon>
{{ i18n "pages.inbounds.delDepletedClients" }}
</a-menu-item>
- <a-menu-item v-if="subSettings.enable && dbInbounds.length > 0" key="addGroupClient">
- <a-icon type="usergroup-add"></a-icon>
- {{ i18n "pages.client.groupAdd"}}
- </a-menu-item>
</a-menu>
</a-dropdown>
</a-col>
@@ -289,7 +285,7 @@
<p v-for="clientEmail in clientCount[dbInbound.id].online">[[ clientEmail ]]</p>
</template>
<a-tag style="margin:0; padding: 0 2px;" color="blue" v-if="clientCount[dbInbound.id].online.length">[[ clientCount[dbInbound.id].online.length ]]</a-tag>
- </a-popover>
+ </a-popover>
</template>
</template>
<template slot="traffic" slot-scope="text, dbInbound">
@@ -343,7 +339,7 @@
<a-tag style="margin:0;" color="blue">[[ dbInbound.toInbound().stream.network ]]</a-tag>
<a-tag style="margin:0;" v-if="dbInbound.toInbound().stream.isTls" color="green">tls</a-tag>
<a-tag style="margin:0;" v-if="dbInbound.toInbound().stream.isReality" color="green">reality</a-tag>
- </template>
+ </template>
</td>
</tr>
<tr>
@@ -377,7 +373,7 @@
<p v-for="clientEmail in clientCount[dbInbound.id].online">[[ clientEmail ]]</p>
</template>
<a-tag style="margin:0; padding: 0 2px;" color="green" v-if="clientCount[dbInbound.id].online.length">[[ clientCount[dbInbound.id].online.length ]]</a-tag>
- </a-popover>
+ </a-popover>
</td>
</tr>
<tr>
@@ -744,9 +740,6 @@
case "delDepletedClients":
this.delDepletedClients(-1)
break;
- case "addGroupClient":
- this.openGroupAddClient()
- break;
}
},
clickAction(action, dbInbound) {
@@ -890,20 +883,6 @@
await this.submit(`/panel/inbound/update/${dbInbound.id}`, data, inModal);
},
- openGroupAddClient() {
- clientModal.show({
- title: '{{ i18n "pages.client.groupAdd"}}',
- okText: '{{ i18n "pages.client.submitAdd"}}',
- dbInbounds: this.dbInbounds,
- confirm: async (clients, dbInboundIds) => {
- clientModal.loading();
- await this.addGroupClient(clients, dbInboundIds);
- clientModal.close();
- await this.showQrcode(dbInboundIds[0],clients[0], true)
- },
- isEdit: false
- });
- },
openAddClient(dbInboundId) {
dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
clientModal.show({
@@ -914,7 +893,6 @@
clientModal.loading();
await this.addClient(clients, dbInboundId);
clientModal.close();
- await this.showQrcode(dbInboundId,clients)
},
isEdit: false
});
@@ -939,7 +917,6 @@
clientModal.show({
title: '{{ i18n "pages.client.edit"}}',
okText: '{{ i18n "pages.client.submitEdit"}}',
- dbInbounds: this.dbInbounds,
dbInbound: dbInbound,
index: index,
confirm: async (client, dbInboundId, clientId) => {
@@ -963,41 +940,14 @@
id: dbInboundId,
settings: '{"clients": [' + clients.toString() + ']}',
};
-
- await this.submit(`/panel/inbound/addClient`, data)
- },
-
- async addGroupClient(clients, dbInboundIds) {
- const data = []
- dbInboundIds.forEach((dbInboundId, index) => {
- data.push({
- id: dbInboundId,
- settings: '{"clients": [' + clients[index].toString() + ']}',
- })
- })
-
- await this.submit(`/panel/inbound/addGroupClient`, data, true)
+ await this.submit(`/panel/inbound/addClient`, data);
},
async updateClient(client, dbInboundId, clientId) {
- if (Array.isArray(client) && Array.isArray(dbInboundId) && Array.isArray(clientId)){
- const data = []
- client.forEach((client, index) => {
- data.push({
- clientId: clientId[index],
- inbound: {
- id: dbInboundId[index],
- settings: '{"clients": [' + client.toString() + ']}',
- }
- })
- })
- await this.submit(`/panel/inbound/updateClients`, data, true);
- }else{
- const data = {
- id: dbInboundId,
- settings: '{"clients": [' + client.toString() + ']}',
- };
- await this.submit(`/panel/inbound/updateClient/${clientId}`, data);
- }
+ const data = {
+ id: dbInboundId,
+ settings: '{"clients": [' + client.toString() + ']}',
+ };
+ await this.submit(`/panel/inbound/updateClient/${clientId}`, data);
},
resetTraffic(dbInboundId) {
dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
@@ -1051,8 +1001,8 @@
checkFallback(dbInbound) {
newDbInbound = new DBInbound(dbInbound);
if (dbInbound.listen.startsWith("@")){
- rootInbound = this.inbounds.find((i) =>
- i.isTcp &&
+ rootInbound = this.inbounds.find((i) =>
+ i.isTcp &&
['trojan','vless'].includes(i.protocol) &&
i.settings.fallbacks.find(f => f.dest === dbInbound.listen)
);
@@ -1068,10 +1018,10 @@
}
return newDbInbound;
},
- showQrcode(dbInboundId, client, isJustSub = false) {
+ showQrcode(dbInboundId, client) {
dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
newDbInbound = this.checkFallback(dbInbound);
- qrModal.show('{{ i18n "qrCode"}}', newDbInbound, client, isJustSub);
+ qrModal.show('{{ i18n "qrCode"}}', newDbInbound, client);
},
showInfo(dbInboundId, client) {
dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
@@ -1100,8 +1050,8 @@
await this.updateClient(clients[index], dbInboundId, clientId);
this.loading(false);
},
- async submit(url, data, isJson = false) {
- const msg = isJson ? await HttpUtil.postWithModalJson(url, data) : await HttpUtil.postWithModal(url, data);
+ async submit(url, data) {
+ const msg = await HttpUtil.postWithModal(url, data);
if (msg.success) {
await this.getDBInbounds();
}
@@ -1243,7 +1193,7 @@
value: '',
okText: '{{ i18n "pages.inbounds.import" }}',
confirm: async (dbInboundText) => {
- await this.submit('/panel/inbound/import', {data: dbInboundText});
+ await this.submit('/panel/inbound/import', {data: dbInboundText}, promptModal);
promptModal.close();
},
});