From ed3a6c36e6f2fc63fd7a93200e25e2fea681c9ad Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Tue, 12 Mar 2024 23:34:42 +0100 Subject: [PATCH] fix remained traffic in info #1083 --- web/html/xui/inbound_info_modal.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/html/xui/inbound_info_modal.html b/web/html/xui/inbound_info_modal.html index 1ec77f8e..bc733992 100644 --- a/web/html/xui/inbound_info_modal.html +++ b/web/html/xui/inbound_info_modal.html @@ -139,7 +139,7 @@ - [[ sizeFormat(infoModal.clientSettings.totalGB - infoModal.clientStats.up - infoModal.clientStats.down) ]] + [[ getRemStats() ]] @@ -423,7 +423,11 @@ }, statsColor(stats) { return usageColor(stats.up + stats.down, app.trafficDiff, stats.total); - } + }, + getRemStats() { + remained = this.infoModal.clientStats.total - this.infoModal.clientStats.up - this.infoModal.clientStats.down; + return remained>0 ? sizeFormat(remained) : '-'; + }, }, });