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 (instance) return <InstanceCtrl />;
if (nav === 'play' || !nav) return <PlayCtrl />
if (nav === 'play' || nav === 'shop' || !nav) return <PlayCtrl />
if (nav === 'team' || nav === 'account') return <TeamCtrl />
return false;

View File

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

View File

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

View File

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