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-04-25 14:08:35 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-04-25 14:08:35 +0300
commitcc3ff61ae215bdaec0c1ae0c3ee232156015c6b4 (patch)
tree0c4e9f1544b1cd50e03a22fa9a9b94838f90e511 /web/html/xui/client_modal.html
parent045717010a74fa609670caf495458d8ffc99f98f (diff)
update by client id
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html/xui/client_modal.html')
-rw-r--r--web/html/xui/client_modal.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/web/html/xui/client_modal.html b/web/html/xui/client_modal.html
index c01bd10c..bf4ed92a 100644
--- a/web/html/xui/client_modal.html
+++ b/web/html/xui/client_modal.html
@@ -17,13 +17,14 @@
inbound: new Inbound(),
clients: [],
clientStats: [],
+ oldClientId: "",
index: null,
clientIps: null,
isExpired: false,
delayedStart: false,
ok() {
if(clientModal.isEdit){
- ObjectUtil.execute(clientModal.confirm, clientModalApp.client, clientModal.dbInbound.id, clientModal.index);
+ ObjectUtil.execute(clientModal.confirm, clientModalApp.client, clientModal.dbInbound.id, clientModal.oldClientId);
} else {
ObjectUtil.execute(clientModal.confirm, clientModalApp.client, clientModal.dbInbound.id);
}
@@ -39,12 +40,13 @@
this.index = index === null ? this.clients.length : index;
this.isExpired = isEdit ? this.inbound.isExpiry(this.index) : false;
this.delayedStart = false;
- if (!isEdit){
- this.addClient(this.inbound.protocol, this.clients);
- } else {
+ if (isEdit){
if (this.clients[index].expiryTime < 0){
this.delayedStart = true;
}
+ this.oldClientId = this.dbInbound.protocol == "trojan" ? this.clients[index].password : this.clients[index].id;
+ } else {
+ this.addClient(this.inbound.protocol, this.clients);
}
this.clientStats = this.dbInbound.clientStats.find(row => row.email === this.clients[this.index].email);
this.confirm = confirm;