Преглед на файлове

buy: highlight items with no bids in red

same as b1f0e3b0 but in TS
raylu преди 3 седмици
родител
ревизия
b82b3ec1c9
променени са 2 файла, в които са добавени 5 реда и са изтрити 0 реда
  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),