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-05-17 01:31:56 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-05-17 01:31:56 +0300
commit2d16eabc6e751e6233154a082bb6ccd2f816ec41 (patch)
treec3ed0b35d3ad944e2fd722a4b000e3a598020bf9 /web/html/xui/client_modal.html
parentbe50be75fe56a617713efe1cc56de3a14ec7e0c9 (diff)
[feature] interactive deplete soon
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.html9
1 files changed, 2 insertions, 7 deletions
diff --git a/web/html/xui/client_modal.html b/web/html/xui/client_modal.html
index 25974325..ba9fce31 100644
--- a/web/html/xui/client_modal.html
+++ b/web/html/xui/client_modal.html
@@ -20,7 +20,6 @@
oldClientId: "",
index: null,
clientIps: null,
- isExpired: false,
delayedStart: false,
ok() {
if (clientModal.isEdit) {
@@ -38,7 +37,6 @@
this.inbound = dbInbound.toInbound();
this.clients = this.getClients(this.inbound.protocol, this.inbound.settings);
this.index = index === null ? this.clients.length : index;
- this.isExpired = isEdit ? this.inbound.isExpiry(this.index) : false;
this.delayedStart = false;
if (isEdit) {
if (this.clients[index].expiryTime < 0) {
@@ -109,13 +107,10 @@
return true
},
get isExpiry() {
- return this.clientModal.isExpired
+ return this.clientModal.isEdit && this.client.expiryTime >0 ? (this.client.expiryTime < new Date().getTime()) : false;
},
get statsColor() {
- if (!clientStats) return 'blue'
- if (clientStats.total <= 0) return 'blue'
- else if (clientStats.total > 0 && (clientStats.down + clientStats.up) < clientStats.total) return 'cyan'
- else return 'red'
+ return usageColor(clientStats.up + clientStats.down, app.trafficDiff, this.client.totalGB);
},
get delayedExpireDays() {
return this.client && this.client.expiryTime < 0 ? this.client.expiryTime / -86400000 : 0;