diff options
Diffstat (limited to 'web/html/xui/inbounds.html')
| -rw-r--r-- | web/html/xui/inbounds.html | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 3d872cdb..0e08f9d7 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -1112,19 +1112,10 @@ remained = clientStats.totalGB - (clientStats.up + clientStats.down); return remained>0 ? remained : 0; }, - statsColor(dbInbound, email) { - if (email.length == 0) return '#0e49b5'; + clientStatsColor(dbInbound, email) { + if (email.length == 0) return clientUsageColor(); clientStats = dbInbound.clientStats.find(stats => stats.email === email); - switch (true) { - case !clientStats: - return "#0e49b5"; - case clientStats.up + clientStats.down < clientStats.total - app.trafficDiff: - return "#0e49b5"; - case clientStats.up + clientStats.down < clientStats.total: - return "#FFA031"; - default: - return "#E04141"; - } + return clientUsageColor(clientStats, app.trafficDiff) }, statsProgress(dbInbound, email) { if (email.length == 0) return 100; |
