added vbox headers

This commit is contained in:
Mashy 2019-07-15 21:00:48 +10:00
parent 1298257b0e
commit 4db31c4238

View File

@ -168,6 +168,7 @@ function Vbox(args) {
const freeRows = free.map((row, i) => { const freeRows = free.map((row, i) => {
const cells = row.map((c, j) => { const cells = row.map((c, j) => {
const highlighted = c && vboxHighlight.includes(c); const highlighted = c && vboxHighlight.includes(c);
// First two rows are colours
const sendItemType = i > 1 ? i - 1 : 0; const sendItemType = i > 1 ? i - 1 : 0;
const sendItemIndex = i === 1 ? j + 3 : j; const sendItemIndex = i === 1 ? j + 3 : j;
return <td return <td
@ -184,7 +185,6 @@ function Vbox(args) {
{convertItem(c)} {convertItem(c)}
</td>; </td>;
}); });
return ( return (
<tr key={i}> <tr key={i}>
{cells} {cells}
@ -300,9 +300,22 @@ function Vbox(args) {
<h3 onTouchStart={e => e.target.scrollIntoView(true)}>VBOX</h3> <h3 onTouchStart={e => e.target.scrollIntoView(true)}>VBOX</h3>
<div class="bits" onMouseOver={e => hoverInfo(e, 'bits')} >{vbox.bits}b</div> <div class="bits" onMouseOver={e => hoverInfo(e, 'bits')} >{vbox.bits}b</div>
</div> </div>
<div style="text-align: center"> Colours </div>
<table class="vbox-table"> <table class="vbox-table">
<tbody> <tbody>
{freeRows} {freeRows.slice(0, 2)}
</tbody>
</table>
<div style="text-align: center"> Skills </div>
<table class="vbox-table">
<tbody>
{freeRows[2]}
</tbody>
</table>
<div style="text-align: center"> Specs </div>
<table class="vbox-table">
<tbody>
{freeRows[3]}
</tbody> </tbody>
</table> </table>
<button <button