[bug] fix status colors in pages

Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
MHSanaeiandAlireza Ahmadi committed 2023-12-04 23:51:14 +03:30
1 parent ba2d02ae1d
commit 375814da27
6 files changed
+65 -59

No files matched your search

+13
View File
@@ -131,6 +131,19 @@ function usageColor(data, threshold, total) {
}
}
function clientUsageColor(clientStats, trafficDiff) {
switch (true) {
case !clientStats || clientStats.total == 0:
return "#7a316f";
case clientStats.up + clientStats.down < clientStats.total - trafficDiff:
return "#0e49b5";
case clientStats.up + clientStats.down < clientStats.total:
return "#FFA031";
default:
return "#E04141";
}
}
function userExpiryColor(threshold, client, isDark = false) {
if (!client.enable) {
return isDark ? '#2c3950' : '#bcbcbc';