mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-18 05:04:40 +03:00
[bug] fix status colors in pages
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user