game btns
This commit is contained in:
parent
ddca205f0c
commit
4b216775cd
@ -45,7 +45,14 @@ const addState = connect(
|
||||
dispatch(actions.setInstance(null));
|
||||
}
|
||||
|
||||
return { quit };
|
||||
function setChatShow(v) {
|
||||
dispatch(actions.setChatShow(v));
|
||||
}
|
||||
|
||||
return {
|
||||
setChatShow,
|
||||
quit,
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
@ -57,6 +64,7 @@ function GameCtrlBtns(args) {
|
||||
getInstanceState,
|
||||
sendGameSkillClear,
|
||||
sendReady,
|
||||
setChatShow,
|
||||
quit,
|
||||
} = args;
|
||||
|
||||
@ -73,7 +81,7 @@ function GameCtrlBtns(args) {
|
||||
|
||||
return (
|
||||
<div class="game-ctrl-btns">
|
||||
<button disabled={true} >Chat</button>
|
||||
<button disabled={!account.subscribed} onClick={() => setChatShow(!chatShow)}>Chat</button>
|
||||
<button disabled={animating} onClick={sendGameSkillClear}>Clear</button>
|
||||
{finished ? quitBtn : readyBtn}
|
||||
</div>
|
||||
|
||||
@ -9,6 +9,7 @@ const addState = connect(
|
||||
ws,
|
||||
chatShow,
|
||||
instance,
|
||||
account,
|
||||
} = state;
|
||||
|
||||
function sendReady() {
|
||||
@ -23,6 +24,7 @@ const addState = connect(
|
||||
return {
|
||||
instance,
|
||||
chatShow,
|
||||
account,
|
||||
|
||||
sendAbandon,
|
||||
sendReady,
|
||||
@ -44,6 +46,7 @@ function InstanceCtrlBtns(args) {
|
||||
const {
|
||||
instance,
|
||||
chatShow,
|
||||
account,
|
||||
|
||||
sendAbandon,
|
||||
sendReady,
|
||||
@ -63,7 +66,7 @@ function InstanceCtrlBtns(args) {
|
||||
|
||||
return (
|
||||
<div class="instance-ctrl-btns">
|
||||
<button onClick={() => setChatShow(!chatShow)}>Chat</button>
|
||||
<button disabled={!account.subscribed} onClick={() => setChatShow(!chatShow)}>Chat</button>
|
||||
<button disabled={finished} class="ready" onClick={() => sendReady()}>Ready</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user