diff --git a/client/src/components/info.cryp.jsx b/client/src/components/info.cryp.jsx index 3f01afb7..5c7a56b3 100644 --- a/client/src/components/info.cryp.jsx +++ b/client/src/components/info.cryp.jsx @@ -78,6 +78,7 @@ function InfoCryp(args) { e.stopPropagation(); setActiveCryp(cryp); setInfo('highlight', 'spec'); + setVboxHidden(true); } if (!s) { diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index 81cecd30..3fb669b7 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -21,6 +21,7 @@ function Vbox(args) { setCombiner, setInfo, setReclaiming, + showTeam, vboxHidden, vboxInfo, } = args; @@ -97,8 +98,10 @@ function Vbox(args) { // function boundClick(e, i, highlight) { if (reclaiming && vbox.bound[i]) sendVboxReclaim(i); - else if (highlight && activeCryp) sendVboxApply(i); - else if (vbox.bound[i]) { + else if (highlight && activeCryp) { + sendVboxApply(i); + showTeam(); + } else if (vbox.bound[i]) { const insert = combiner.findIndex(j => j === null); if (insert === -1) return setCombiner([i, null, null]); combiner[insert] = i; diff --git a/client/src/components/vbox.container.jsx b/client/src/components/vbox.container.jsx index 53425f86..364e2010 100644 --- a/client/src/components/vbox.container.jsx +++ b/client/src/components/vbox.container.jsx @@ -70,15 +70,22 @@ const addState = connect( return dispatch(actions.setInfo([type, info])); } - function setActiveVar(v) { - return dispatch(actions.setActiveVar(v)); + function setActiveCryp(v) { + return dispatch(actions.setActiveCryp(v)); + } + + function showTeam() { + dispatch(actions.setInfo([null, null])); + dispatch(actions.setVboxHidden(true)); + return true; } return { setCombiner, setReclaiming, setInfo, - setActiveVar, + setActiveCryp, + showTeam, }; } diff --git a/client/src/events.jsx b/client/src/events.jsx index f931f9ce..cfdff2ec 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -133,6 +133,7 @@ function registerEvents(store) { const player = v.players.find(p => p.id === account.id); if (player) store.dispatch(actions.setPlayer(player)); if (v) ws.startInstanceStateTimeout(v.id); + if (v.phase === 'Lobby') store.dispatch(actions.setVboxHidden(true)); return store.dispatch(actions.setInstance(v)); }