availabe mtx btn fix

This commit is contained in:
ntr 2019-09-22 15:24:21 +10:00
parent 6d769ba26d
commit a81f3323ba
4 changed files with 8 additions and 5 deletions

View File

@ -38,7 +38,7 @@ function Controls(args) {
if (game) return <GameCtrl />; if (game) return <GameCtrl />;
if (instance) return <InstanceCtrl />; if (instance) return <InstanceCtrl />;
if (nav === 'play' || !nav) return <PlayCtrl /> if (nav === 'play' || nav === 'shop' || !nav) return <PlayCtrl />
if (nav === 'team' || nav === 'account') return <TeamCtrl /> if (nav === 'team' || nav === 'account') return <TeamCtrl />
return false; return false;

View File

@ -36,10 +36,12 @@ function InstanceCtrlBtns(args) {
sendReady, sendReady,
} = args; } = args;
const finished = instance && instance.phase === 'Finished';
return ( return (
<div class="instance-ctrl-btns"> <div class="instance-ctrl-btns">
<button>Chat</button> <button>Chat</button>
<button class="ready" onClick={() => sendReady()}>Ready</button> <button disabled={finished} class="ready" onClick={() => sendReady()}>Ready</button>
</div> </div>
); );
} }

View File

@ -71,9 +71,9 @@ function Play(args) {
}; };
const availableMtx = (item, i) => ( const availableMtx = (item, i) => (
<figure key={i} onClick={() => mtxBuy(item)} > <figure key={i}>
<figcaption>{item.variant}</figcaption> <figcaption>Enable {item.variant}</figcaption>
<button disabled={account.balance < item.credits}>¤{item.credits}</button> <button onClick={() => mtxBuy(item)} disabled={account.balance < item.credits}>¤{item.credits}</button>
</figure> </figure>
); );

View File

@ -29,6 +29,7 @@ function Scoreboard(args) {
if (!isPlayer) { if (!isPlayer) {
return ( return (
<div class={`player-box top ${player.ready ? 'ready' : ''}`}> <div class={`player-box top ${player.ready ? 'ready' : ''}`}>
<div></div>
<div class="score">{scoreText()}</div> <div class="score">{scoreText()}</div>
<div class="name">{player.name}</div> <div class="name">{player.name}</div>
<div class="img avatar" <div class="img avatar"