mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-20 05:52:24 +00:00
fix colors #1300
This commit is contained in:
parent
07019d6594
commit
bf267c2c48
5 changed files with 23 additions and 23 deletions
|
@ -1,7 +1,7 @@
|
||||||
@import "../lib/style/index.less";
|
@import "../lib/style/index.less";
|
||||||
@import "../lib/style/components.less";
|
@import "../lib/style/components.less";
|
||||||
|
|
||||||
@green-6: #0a7557;
|
@green-6: #008771;
|
||||||
@primary-color: @green-6;
|
@primary-color: @green-6;
|
||||||
@border-radius-base: 1rem;
|
@border-radius-base: 1rem;
|
||||||
@progress-remaining-color: #EDEDED;
|
@progress-remaining-color: #EDEDED;
|
2
web/assets/ant-design-vue@1.7.8/antd.min.css
vendored
2
web/assets/ant-design-vue@1.7.8/antd.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -117,13 +117,13 @@ function setCookie(cname, cvalue, exdays) {
|
||||||
function usageColor(data, threshold, total) {
|
function usageColor(data, threshold, total) {
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case data === null:
|
case data === null:
|
||||||
return "green";
|
return "purple";
|
||||||
case total < 0:
|
case total < 0:
|
||||||
return "blue";
|
return "green";
|
||||||
case total == 0:
|
case total == 0:
|
||||||
return "purple";
|
return "purple";
|
||||||
case data < total - threshold:
|
case data < total - threshold:
|
||||||
return "blue";
|
return "green";
|
||||||
case data < total:
|
case data < total:
|
||||||
return "orange";
|
return "orange";
|
||||||
default:
|
default:
|
||||||
|
@ -134,13 +134,13 @@ function usageColor(data, threshold, total) {
|
||||||
function clientUsageColor(clientStats, trafficDiff) {
|
function clientUsageColor(clientStats, trafficDiff) {
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case !clientStats || clientStats.total == 0:
|
case !clientStats || clientStats.total == 0:
|
||||||
return "#7a316f";
|
return "#7a316f"; // purple
|
||||||
case clientStats.up + clientStats.down < clientStats.total - trafficDiff:
|
case clientStats.up + clientStats.down < clientStats.total - trafficDiff:
|
||||||
return "#0e49b5";
|
return "#008771"; // Green
|
||||||
case clientStats.up + clientStats.down < clientStats.total:
|
case clientStats.up + clientStats.down < clientStats.total:
|
||||||
return "#ffa031";
|
return "#f37b24"; // Orange
|
||||||
default:
|
default:
|
||||||
return "#e04141";
|
return "#cf3c3c"; // Red
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,17 +152,17 @@ function userExpiryColor(threshold, client, isDark = false) {
|
||||||
expiry = client.expiryTime;
|
expiry = client.expiryTime;
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case expiry === null:
|
case expiry === null:
|
||||||
return "#389e0d";
|
return "#7a316f"; // purple
|
||||||
case expiry < 0:
|
case expiry < 0:
|
||||||
return "#0e49b5";
|
return "#008771"; // Green
|
||||||
case expiry == 0:
|
case expiry == 0:
|
||||||
return "#7a316f";
|
return "#7a316f"; // purple
|
||||||
case now < expiry - threshold:
|
case now < expiry - threshold:
|
||||||
return "#0e49b5";
|
return "#008771"; // Green
|
||||||
case now < expiry:
|
case now < expiry:
|
||||||
return "#ffa031";
|
return "#f37b24"; // Orange
|
||||||
default:
|
default:
|
||||||
return "#e04141";
|
return "#cf3c3c"; // Red
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1154,13 +1154,13 @@
|
||||||
expColor = usageColor(new Date().getTime(), this.expireDiff, clientStats.expiryTime);
|
expColor = usageColor(new Date().getTime(), this.expireDiff, clientStats.expiryTime);
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case statsColor == "red" || expColor == "red":
|
case statsColor == "red" || expColor == "red":
|
||||||
return "#E04141";
|
return "#cf3c3c"; // Red
|
||||||
case statsColor == "orange" || expColor == "orange":
|
case statsColor == "orange" || expColor == "orange":
|
||||||
return "#FFA031";
|
return "#f37b24"; // Orange
|
||||||
case statsColor == "blue" || expColor == "blue":
|
case statsColor == "green" || expColor == "green":
|
||||||
return "#0e49b5";
|
return "#008771"; // Green
|
||||||
default:
|
default:
|
||||||
return "#7a316f";
|
return "#7a316f"; // purple
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isClientEnabled(dbInbound, email) {
|
isClientEnabled(dbInbound, email) {
|
||||||
|
|
|
@ -345,11 +345,11 @@
|
||||||
get color() {
|
get color() {
|
||||||
const percent = this.percent;
|
const percent = this.percent;
|
||||||
if (percent < 80) {
|
if (percent < 80) {
|
||||||
return '#0a7557';
|
return '#008771'; // Green
|
||||||
} else if (percent < 90) {
|
} else if (percent < 90) {
|
||||||
return '#ffa031';
|
return "#f37b24"; // Orange
|
||||||
} else {
|
} else {
|
||||||
return '#e04141';
|
return "#cf3c3c"; // Red
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue