diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-12-04 23:21:14 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-12-04 23:21:14 +0300 |
| commit | 375814da273cd2548c30fc56a86dd74ef5f009c9 (patch) | |
| tree | 4409f350f8a588aa5e82c06757654e971904b575 /web/html/xui/inbounds.html | |
| parent | ba2d02ae1d1ff202c290c0c4800a1ea30a36c823 (diff) | |
[bug] fix status colors in pages
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
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; |
