wi
This commit is contained in:
@@ -52,15 +52,13 @@ function combinerBtn(props) {
|
||||
}
|
||||
return (
|
||||
<div class='combiner'>
|
||||
<div class='vbox-padding'>
|
||||
<button
|
||||
class='vbox-btn'
|
||||
disabled={!mouseEvent}
|
||||
onClick={e => e.stopPropagation()}
|
||||
onMouseDown={() => mouseEvent()}>
|
||||
{text}
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
class='vbox-btn'
|
||||
disabled={!mouseEvent}
|
||||
onClick={e => e.stopPropagation()}
|
||||
onMouseDown={() => mouseEvent()}>
|
||||
{text}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -177,27 +177,25 @@ class Vbox extends preact.Component {
|
||||
function storeHdr() {
|
||||
return (
|
||||
<div class="store-hdr">
|
||||
<div class='vbox-padding'>
|
||||
<h3
|
||||
onTouchStart={e => e.target.scrollIntoView(true)}
|
||||
onMouseOver={e => vboxHover(e, 'store')}> STORE
|
||||
</h3>
|
||||
<div class={`bits ${vbox.bits < 3 ? 'red' : false}`} onMouseOver={e => vboxHover(e, 'bits')}>
|
||||
<h2> {vbox.bits}b </h2>
|
||||
</div>
|
||||
<button
|
||||
class='vbox-btn'
|
||||
onMouseOver={e => vboxHover(e, 'refill')}
|
||||
disabled={vbox.bits < 2
|
||||
|| (tutorial && tutorial < 7
|
||||
&& instance.time_control === 'Practice' && instance.rounds.length === 1)
|
||||
}
|
||||
onClick={e => e.stopPropagation()}
|
||||
onMouseDown={() => sendVboxDiscard()}>
|
||||
refill <br />
|
||||
2b
|
||||
</button>
|
||||
<h3
|
||||
onTouchStart={e => e.target.scrollIntoView(true)}
|
||||
onMouseOver={e => vboxHover(e, 'store')}> STORE
|
||||
</h3>
|
||||
<div class={`bits ${vbox.bits < 3 ? 'red' : false}`} onMouseOver={e => vboxHover(e, 'bits')}>
|
||||
<h2> {vbox.bits}b </h2>
|
||||
</div>
|
||||
<button
|
||||
class='vbox-btn'
|
||||
onMouseOver={e => vboxHover(e, 'refill')}
|
||||
disabled={vbox.bits < 2
|
||||
|| (tutorial && tutorial < 7
|
||||
&& instance.time_control === 'Practice' && instance.rounds.length === 1)
|
||||
}
|
||||
onClick={e => e.stopPropagation()}
|
||||
onMouseDown={() => sendVboxDiscard()}>
|
||||
refill <br />
|
||||
2b
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -205,11 +203,9 @@ class Vbox extends preact.Component {
|
||||
function stashHdr() {
|
||||
return (
|
||||
<div class='stash-hdr'>
|
||||
<div class='vbox-padding'>
|
||||
<h3 onTouchStart={e => e.target.scrollIntoView(true)}
|
||||
onMouseOver={e => vboxHover(e, 'stash')}> STASH
|
||||
</h3>
|
||||
</div>
|
||||
<h3 onTouchStart={e => e.target.scrollIntoView(true)}
|
||||
onMouseOver={e => vboxHover(e, 'stash')}> STASH
|
||||
</h3>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -221,19 +217,17 @@ class Vbox extends preact.Component {
|
||||
&& instance.time_control === 'Practice' && instance.rounds.length === 1;
|
||||
return (
|
||||
<div class='refund'>
|
||||
<div class='vbox-padding'>
|
||||
<button
|
||||
disabled={tutorialDisabled || !refund}
|
||||
class='vbox-btn'
|
||||
onClick={e => e.stopPropagation()}
|
||||
onMouseDown={e => {
|
||||
e.stopPropagation();
|
||||
sendVboxReclaim(vboxSelected.stashSelect[0]);
|
||||
}}>
|
||||
refund <br />
|
||||
{refund}b
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
disabled={tutorialDisabled || !refund}
|
||||
class='vbox-btn'
|
||||
onClick={e => e.stopPropagation()}
|
||||
onMouseDown={e => {
|
||||
e.stopPropagation();
|
||||
sendVboxReclaim(vboxSelected.stashSelect[0]);
|
||||
}}>
|
||||
refund <br />
|
||||
{refund}b
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -99,9 +99,7 @@ function stashElement(props) {
|
||||
onDragOver={ev => ev.preventDefault()}
|
||||
onDrop={stashClick}
|
||||
>
|
||||
<div class='vbox-padding'>
|
||||
{range(0, 4).map(i => stashBtn(vbox.bound[i], i))}
|
||||
</div>
|
||||
{range(0, 4).map(i => stashBtn(vbox.bound[i], i))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -65,14 +65,12 @@ function storeElement(props) {
|
||||
return (
|
||||
<div class='store'
|
||||
onClick={e => e.stopPropagation()}>
|
||||
<div class='vbox-padding'>
|
||||
<div class="vbox-colours">
|
||||
{range(0, 6).map(i => availableBtn(vbox.free[0][i], 0, i))}
|
||||
</div>
|
||||
<div class="vbox-items">
|
||||
{range(0, 3).map(i => availableBtn(vbox.free[1][i], 1, i))}
|
||||
{range(0, 3).map(i => availableBtn(vbox.free[2][i], 2, i))}
|
||||
</div>
|
||||
<div class="vbox-colours">
|
||||
{range(0, 6).map(i => availableBtn(vbox.free[0][i], 0, i))}
|
||||
</div>
|
||||
<div class="vbox-items">
|
||||
{range(0, 3).map(i => availableBtn(vbox.free[1][i], 1, i))}
|
||||
{range(0, 3).map(i => availableBtn(vbox.free[2][i], 2, i))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user