Selaa lähdekoodia

buy: highlight items with no bids in red

same as b1f0e3b0 but in TS
raylu 3 viikkoa sitten
vanhempi
commit
b82b3ec1c9
2 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 2 0
      ts/buy.ts
  2. 3 0
      www/style.css

+ 2 - 0
ts/buy.ts

@@ -73,6 +73,8 @@ async function calculate(username: string, apiKey: string, supplyForDays: number
 			<td>${format(m.spread)}</td>
 			<td>${format(m.savings)}</td>
 		`;
+		if (m.bids === 0 && buyAmount > 0)
+			tr.children[2].classList.add('red');
 		tbody.appendChild(tr);
 	}
 

+ 3 - 0
www/style.css

@@ -71,6 +71,9 @@ table.buy {
 		font-family: inherit;
 		text-align: inherit;
 	}
+	td.red {
+		color: #c66;
+	}
 }
 table.roi {
 	td:nth-child(1),