diff options
| author | Alireza Ahmadi <alireza7@gmail.com> | 2023-12-09 15:59:48 +0300 |
|---|---|---|
| committer | Alireza Ahmadi <alireza7@gmail.com> | 2023-12-09 16:11:25 +0300 |
| commit | bf267c2c48ebc3dc54c28e7713ba7f1615aea944 (patch) | |
| tree | 4b656fee16e437b8b1fdecc66a9cec08f5c7f2a1 /web/assets/js | |
| parent | 07019d659464f698755f7a83d920871f6a8a7c08 (diff) | |
fix colors #1300
Diffstat (limited to 'web/assets/js')
| -rw-r--r-- | web/assets/js/util/common.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/web/assets/js/util/common.js b/web/assets/js/util/common.js index 82bc9a0c..5f20d7d9 100644 --- a/web/assets/js/util/common.js +++ b/web/assets/js/util/common.js @@ -117,13 +117,13 @@ function setCookie(cname, cvalue, exdays) { function usageColor(data, threshold, total) { switch (true) { case data === null: - return "green"; + return "purple"; case total < 0: - return "blue"; + return "green"; case total == 0: return "purple"; case data < total - threshold: - return "blue"; + return "green"; case data < total: return "orange"; default: @@ -134,13 +134,13 @@ function usageColor(data, threshold, total) { function clientUsageColor(clientStats, trafficDiff) { switch (true) { case !clientStats || clientStats.total == 0: - return "#7a316f"; + return "#7a316f"; // purple case clientStats.up + clientStats.down < clientStats.total - trafficDiff: - return "#0e49b5"; + return "#008771"; // Green case clientStats.up + clientStats.down < clientStats.total: - return "#ffa031"; + return "#f37b24"; // Orange default: - return "#e04141"; + return "#cf3c3c"; // Red } } @@ -152,17 +152,17 @@ function userExpiryColor(threshold, client, isDark = false) { expiry = client.expiryTime; switch (true) { case expiry === null: - return "#389e0d"; + return "#7a316f"; // purple case expiry < 0: - return "#0e49b5"; + return "#008771"; // Green case expiry == 0: - return "#7a316f"; + return "#7a316f"; // purple case now < expiry - threshold: - return "#0e49b5"; + return "#008771"; // Green case now < expiry: - return "#ffa031"; + return "#f37b24"; // Orange default: - return "#e04141"; + return "#cf3c3c"; // Red } } |
