added vbox headers
This commit is contained in:
parent
1298257b0e
commit
4db31c4238
@ -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
|
||||||
@ -180,11 +181,10 @@ function Vbox(args) {
|
|||||||
// onClick={freeClick}
|
// onClick={freeClick}
|
||||||
onDblClick={() => sendVboxAccept(sendItemType, sendItemIndex) }
|
onDblClick={() => sendVboxAccept(sendItemType, sendItemIndex) }
|
||||||
onMouseOver={e => vboxHover(e, c)}
|
onMouseOver={e => vboxHover(e, c)}
|
||||||
>
|
>
|
||||||
{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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user