mirror of
https://github.com/Retropex/custom-ocean.xyz-dashboard.git
synced 2025-05-12 19:20:45 +02:00
Enhance profit color visibility in updateUI function
Updated the `style.color` property for negative profit elements in the `updateUI` function to include the `!important` flag. This change ensures that the red color (`#ff5555`) takes precedence over conflicting styles, improving the visibility of negative profit indicators in the user interface.
This commit is contained in:
parent
9681077fbd
commit
08034ea9a7
@ -1224,7 +1224,7 @@ function updateUI() {
|
|||||||
if (dailyProfitElement) {
|
if (dailyProfitElement) {
|
||||||
dailyProfitElement.textContent = "$" + numberWithCommas(dailyProfitUSD.toFixed(2));
|
dailyProfitElement.textContent = "$" + numberWithCommas(dailyProfitUSD.toFixed(2));
|
||||||
if (dailyProfitUSD < 0) {
|
if (dailyProfitUSD < 0) {
|
||||||
dailyProfitElement.style.color = "#ff5555";
|
dailyProfitElement.style.color = "#ff5555 !important";
|
||||||
} else {
|
} else {
|
||||||
dailyProfitElement.style.color = ""; // Reset to default color
|
dailyProfitElement.style.color = ""; // Reset to default color
|
||||||
}
|
}
|
||||||
@ -1236,7 +1236,7 @@ function updateUI() {
|
|||||||
if (monthlyProfitElement) {
|
if (monthlyProfitElement) {
|
||||||
monthlyProfitElement.textContent = "$" + numberWithCommas(monthlyProfitUSD.toFixed(2));
|
monthlyProfitElement.textContent = "$" + numberWithCommas(monthlyProfitUSD.toFixed(2));
|
||||||
if (monthlyProfitUSD < 0) {
|
if (monthlyProfitUSD < 0) {
|
||||||
monthlyProfitElement.style.color = "#ff5555";
|
monthlyProfitElement.style.color = "#ff5555 !important";
|
||||||
} else {
|
} else {
|
||||||
monthlyProfitElement.style.color = ""; // Reset to default color
|
monthlyProfitElement.style.color = ""; // Reset to default color
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user