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>2023-03-17 01:01:14 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-03-17 01:01:14 +0300
commitbc56e637376142c370c31b17558fc3778a863bd2 (patch)
treec79da826c4dc58ca6b024a419959ed3475599a10 /web/html/xui/inbound_modal.html
parenta3e562896178fadc3df5a921669e75824180ccf8 (diff)
pack1
Diffstat (limited to 'web/html/xui/inbound_modal.html')
-rw-r--r--web/html/xui/inbound_modal.html56
1 files changed, 26 insertions, 30 deletions
diff --git a/web/html/xui/inbound_modal.html b/web/html/xui/inbound_modal.html
index 54a64bf9..7b7450b6 100644
--- a/web/html/xui/inbound_modal.html
+++ b/web/html/xui/inbound_modal.html
@@ -1,6 +1,7 @@
{{define "inboundModal"}}
<a-modal id="inbound-modal" v-model="inModal.visible" :title="inModal.title" @ok="inModal.ok"
:confirm-loading="inModal.confirmLoading" :closable="true" :mask-closable="false"
+ :class="siderDrawer.isDarkTheme ? darkClass : ''"
:ok-text="inModal.okText" cancel-text='{{ i18n "close" }}'>
{{template "form/inbound"}}
</a-modal>
@@ -88,22 +89,18 @@
removeClient(index, clients) {
clients.splice(index, 1);
},
- async getDBClientIps(email,event) {
-
- const msg = await HttpUtil.post('/xui/inbound/clientIps/'+ email);
- if (!msg.success) {
- return;
- }
- try {
- ips = JSON.parse(msg.obj)
- ips = ips.join(",")
- event.target.value = ips
- } catch (error) {
- // text
- event.target.value = msg.obj
-
- }
-
+ async getDBClientIps(email, event) {
+ const msg = await HttpUtil.post('/xui/inbound/clientIps/' + email);
+ if (!msg.success) {
+ return;
+ }
+ try {
+ let ips = JSON.parse(msg.obj);
+ ips = ips.join(",");
+ event.target.value = ips;
+ } catch (error) {
+ event.target.value = msg.obj;
+ }
},
async clearDBClientIps(email,event) {
const msg = await HttpUtil.post('/xui/inbound/clearClientIps/'+ email);
@@ -112,20 +109,19 @@
}
event.target.value = ""
},
- async resetClientTraffic(client,event) {
- const msg = await HttpUtil.post('/xui/inbound/resetClientTraffic/'+ client.email);
- if (!msg.success) {
- return;
- }
- clientStats = this.inbound.clientStats
- if(clientStats.length > 0)
- {
- for (const key in clientStats) {
- if (Object.hasOwnProperty.call(clientStats, key)) {
- if(clientStats[key]['email'] == client.email){
- clientStats[key]['up'] = 0
- clientStats[key]['down'] = 0
- }
+ async resetClientTraffic(client, event) {
+ const msg = await HttpUtil.post(`/xui/inbound/resetClientTraffic/${client.email}`);
+ if (!msg.success) {
+ return;
+ }
+ const clientStats = this.inbound.clientStats;
+ if (clientStats.length > 0) {
+ for (let i = 0; i < clientStats.length; i++) {
+ if (clientStats[i].email === client.email) {
+ clientStats[i].up = 0;
+ clientStats[i].down = 0;
+ break; // Stop looping once we've found the matching client.
+
}
}
}