diff --git a/WORKLOG.md b/WORKLOG.md index cf457b0f..a77f2303 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -36,7 +36,6 @@ purge green disable rework scatter -change strangle hatred maybe reconnect based on time delta diff --git a/client/assets/styles/styles.css b/client/assets/styles/styles.css index f22161cd..0f79e760 100644 --- a/client/assets/styles/styles.css +++ b/client/assets/styles/styles.css @@ -482,6 +482,11 @@ main .top button { width: 100%; } + +.ready-btn:hover, .ready-btn:focus, .ready-btn:active { + color: forestgreen; +} + .ready { background: forestgreen; color: black; diff --git a/client/src/components/game.footer.jsx b/client/src/components/game.footer.jsx index 220631c6..287b0eab 100644 --- a/client/src/components/game.footer.jsx +++ b/client/src/components/game.footer.jsx @@ -75,26 +75,34 @@ function GameFooter(props) { const playerTeam = game.players.find(t => t.id === account.id); - function actionClick() { - if (game.phase === 'Finish') { - sendInstanceState(game.instance); - quit(); - return true; - } - - if (resolution) { - return skip(); - } - - return sendGameReady(); + function quitClick() { + sendInstanceState(game.instance); + quit(); + return true; } - let actionText = 'Ready'; - if (game.phase === 'Finish') actionText = 'Done'; - if (resolution) actionText = 'Skip'; - const ready = (actionText === 'Ready' && playerTeam.ready) - ? 'ready' - : ''; + const quitBtn = ( + + ); + + const skipBtn = ( + + ); + + + const readyBtn = ( + + ); const zero = Date.parse(game.phase_start); const now = Date.now(); @@ -125,11 +133,9 @@ function GameFooter(props) { ); } diff --git a/client/src/components/instance.footer.jsx b/client/src/components/instance.footer.jsx index e07e4db0..1ebe3c5a 100644 --- a/client/src/components/instance.footer.jsx +++ b/client/src/components/instance.footer.jsx @@ -62,7 +62,7 @@ function Instance(args) { return setInfo(info); } - const rdyClasses = `${player.ready ? 'ready' : ''}`; + const rdyClasses = `${player.ready ? 'ready ready-btn' : 'ready-btn'}`; const readyInfo = instance.phase === 'Lobby' ? 'lobbyReady' : 'ready'; diff --git a/client/src/events.jsx b/client/src/events.jsx index 2e819361..5567b9de 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -61,14 +61,14 @@ function registerEvents(store) { const sequence = getCombatSequence(r); return eachSeries(sequence, (stage, sCb) => { const { skip } = store.getState(); - if (skip) return sCb(); + if (skip) return sCb('skip'); const stagedR = Object.create(r); stagedR.stage = stage; store.dispatch(actions.setResolution(stagedR)); return setTimeout(sCb, TIMES[stage]); }, err => { - if (err) return console.error(err); + if (err) console.error(err); // Finished this resolution return cb(); });