diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html index 3f91c8e8..1de05ac9 100644 --- a/web/html/xui/form/client.html +++ b/web/html/xui/form/client.html @@ -26,6 +26,12 @@ + + + + + + @@ -62,12 +68,6 @@ - - - - - - {{ i18n "none" }} diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html index 158b64af..79e797c6 100644 --- a/web/html/xui/form/protocol/trojan.html +++ b/web/html/xui/form/protocol/trojan.html @@ -60,6 +60,7 @@ diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html index 03069c29..2da4a255 100644 --- a/web/html/xui/form/protocol/vless.html +++ b/web/html/xui/form/protocol/vless.html @@ -66,7 +66,8 @@ + :dropdown-class-name="siderDrawer.isDarkTheme ? 'ant-card-dark' : ''" + v-model="client._expiryTime" style="width: 170px;"> diff --git a/web/html/xui/form/protocol/vmess.html b/web/html/xui/form/protocol/vmess.html index d425e080..ad2b3960 100644 --- a/web/html/xui/form/protocol/vmess.html +++ b/web/html/xui/form/protocol/vmess.html @@ -57,7 +57,8 @@ + :dropdown-class-name="siderDrawer.isDarkTheme ? 'ant-card-dark' : ''" + v-model="client._expiryTime" style="width: 170px;"> diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 728e62a0..2d6016f3 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -349,7 +349,7 @@ depleted.push(client.email); } else { if ((client.expiryTime > 0 && (client.expiryTime-now < this.expireDiff)) || - (client.total > 0 && (client.total-client.up+client.down < this.trafficDiff ))) expiring.push(client.email); + (client.total > 0 && (client.total-(client.up+client.down) < this.trafficDiff ))) expiring.push(client.email); } }); } else { diff --git a/web/service/tgbot.go b/web/service/tgbot.go index 2ab3dbb0..6da0df57 100644 --- a/web/service/tgbot.go +++ b/web/service/tgbot.go @@ -536,14 +536,14 @@ func (t *Tgbot) getExhausted() string { for _, inbound := range inbounds { if inbound.Enable { if (inbound.ExpiryTime > 0 && (inbound.ExpiryTime-now < exDiff)) || - (inbound.Total > 0 && (inbound.Total-inbound.Up+inbound.Down < trDiff)) { + (inbound.Total > 0 && (inbound.Total-(inbound.Up+inbound.Down) < trDiff)) { exhaustedInbounds = append(exhaustedInbounds, *inbound) } if len(inbound.ClientStats) > 0 { for _, client := range inbound.ClientStats { if client.Enable { if (client.ExpiryTime > 0 && (client.ExpiryTime-now < exDiff)) || - (client.Total > 0 && (client.Total-client.Up+client.Down < trDiff)) { + (client.Total > 0 && (client.Total-(client.Up+client.Down) < trDiff)) { exhaustedClients = append(exhaustedClients, client) } } else {