always show recipes on vbox click

This commit is contained in:
ntr 2019-05-08 16:34:37 +10:00
parent d8c5effb2d
commit 9abbc26308
2 changed files with 11 additions and 1 deletions

View File

@ -8,6 +8,7 @@ const { convertVar } = require('./../utils');
function Vbox(args) { function Vbox(args) {
const { const {
activeCryp, activeCryp,
setActiveCryp,
combiner, combiner,
info, info,
instance, instance,
@ -72,6 +73,14 @@ function Vbox(args) {
return false; return false;
}; };
function freeClick() {
if (c) {
setActiveCryp(null);
return setInfo('item', c);
}
return false;
}
return <td return <td
key={j} key={j}
className={`${highlighted() ? 'highlight' : ''}`} className={`${highlighted() ? 'highlight' : ''}`}
@ -79,7 +88,7 @@ function Vbox(args) {
onTouchEnd={e => vboxTouchEnd(e, i, j)} onTouchEnd={e => vboxTouchEnd(e, i, j)}
onTouchMove={e => vboxTouchMove(e)} onTouchMove={e => vboxTouchMove(e)}
onClick={() => { if (c) return setInfo('item', c); }} onClick={freeClick}
onDblClick={() => sendVboxAccept(j, i) } onDblClick={() => sendVboxAccept(j, i) }
> >
{convertVar(c)} {convertVar(c)}

View File

@ -82,6 +82,7 @@ const addState = connect(
return { return {
setCombiner, setCombiner,
setActiveCryp,
setReclaiming, setReclaiming,
setInfo, setInfo,
setActiveCryp, setActiveCryp,