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:
DJObleezy 2025-04-11 22:47:01 -07:00
parent 9681077fbd
commit 08034ea9a7

View File

@ -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
} }