From b8d1c78f61e4ed5d09ac8edf58f23d1a1ada3081 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 9 Aug 2019 15:38:09 +1000 Subject: [PATCH] remove resolution --- client/assets/styles/controls.less | 2 +- client/assets/styles/instance.less | 2 +- client/assets/styles/styles.less | 71 ++++++++---------------- client/src/actions.jsx | 1 - client/src/components/game.construct.jsx | 2 - client/src/components/game.ctrl.jsx | 5 +- client/src/components/game.footer.jsx | 16 +----- client/src/events.jsx | 1 - client/src/reducers.jsx | 1 - 9 files changed, 32 insertions(+), 69 deletions(-) diff --git a/client/assets/styles/controls.less b/client/assets/styles/controls.less index 4df23a5b..26adcd50 100644 --- a/client/assets/styles/controls.less +++ b/client/assets/styles/controls.less @@ -9,7 +9,7 @@ aside { font-size: 150%; } - button.ready { + button.ready:enabled { &:hover { color: forestgreen; border-color: forestgreen; diff --git a/client/assets/styles/instance.less b/client/assets/styles/instance.less index 83218972..67d17fd0 100644 --- a/client/assets/styles/instance.less +++ b/client/assets/styles/instance.less @@ -40,7 +40,7 @@ .instance .info { /*font-size: 75%;*/ - margin: 3em 0 0 1em; + margin: 0 0 0 1em; grid-area: info; display: flex; flex-flow: column; diff --git a/client/assets/styles/styles.less b/client/assets/styles/styles.less index b1d78d6e..4a171ab0 100644 --- a/client/assets/styles/styles.less +++ b/client/assets/styles/styles.less @@ -450,30 +450,6 @@ header { opacity: 0 } -.inventory { - margin-right: 2em; - grid-area: inventory; - - display: grid; - grid-template-columns: 1fr 1fr; -} - -.inventory .list { - letter-spacing: 0.25em; - text-transform: uppercase; - display: grid; - grid-template-columns: repeat(4, 1fr); - grid-gap: 1em; - flex-flow: row wrap; - align-items: flex-end; -} - -.inventory figure { - font-size: 125%; - display: flex; - flex-flow: column; -} - .play { height: 100%; display: grid; @@ -485,28 +461,6 @@ header { "team" "inventory"; - .join { - grid-area: join; - - .buttons { - margin-top: 1em; - display: grid; - font-size: 200%; - grid-template-columns: repeat(2, 1fr); - grid-gap: 1em; - flex-flow: row wrap; - align-items: flex-end; - - button { - height: 3em; - &:hover { - border-color: @green; - color: @green; - } - } - } - } - .team { grid-area: team; @@ -514,14 +468,37 @@ header { padding: 0.5em 2em 0 0; margin-bottom: 2em; border-bottom: 0.1em solid whitesmoke; + } .menu-construct { flex: 1 0 33%; } -} + .inventory { + margin-right: 2em; + grid-area: inventory; + display: grid; + grid-template-columns: 1fr 1fr; + + .list { + letter-spacing: 0.25em; + text-transform: uppercase; + display: grid; + grid-template-columns: repeat(4, 1fr); + grid-gap: 1em; + flex-flow: row wrap; + align-items: flex-end; + } + + figure { + font-size: 125%; + display: flex; + flex-flow: column; + } + } +} .menu-instance-btn { flex: 1 1 100%; diff --git a/client/src/actions.jsx b/client/src/actions.jsx index d47e552f..149dcb2a 100644 --- a/client/src/actions.jsx +++ b/client/src/actions.jsx @@ -26,7 +26,6 @@ export const setNav = value => ({ type: 'SET_NAV', value }); export const setPing = value => ({ type: 'SET_PING', value }); export const setPlayer = value => ({ type: 'SET_PLAYER', value }); export const setReclaiming = value => ({ type: 'SET_RECLAIMING', value }); -export const setResolution = value => ({ type: 'SET_RESOLUTION', value }); export const setShowLog = value => ({ type: 'SET_SHOW_LOG', value }); export const setShowNav = value => ({ type: 'SET_SHOW_NAV', value }); export const setSkip = value => ({ type: 'SET_SKIP', value }); diff --git a/client/src/components/game.construct.jsx b/client/src/components/game.construct.jsx index c7e2b4fb..8976c78e 100644 --- a/client/src/components/game.construct.jsx +++ b/client/src/components/game.construct.jsx @@ -18,7 +18,6 @@ const addState = connect( account, activeSkill, animFocus, - resolution, animating, animText, } = state; @@ -37,7 +36,6 @@ const addState = connect( return { game, account, - resolution, animating, animFocus, animText, diff --git a/client/src/components/game.ctrl.jsx b/client/src/components/game.ctrl.jsx index 4f209cc0..7b9e2bfd 100644 --- a/client/src/components/game.ctrl.jsx +++ b/client/src/components/game.ctrl.jsx @@ -5,6 +5,7 @@ const addState = connect( function receiveState(state) { const { ws, + animating, game, } = state; @@ -15,6 +16,7 @@ const addState = connect( return { game, + animating, sendGameReady, }; }, @@ -23,12 +25,13 @@ const addState = connect( function Controls(args) { const { game, + animating, sendGameReady } = args; return ( ); } diff --git a/client/src/components/game.footer.jsx b/client/src/components/game.footer.jsx index 3d242017..3c989c3a 100644 --- a/client/src/components/game.footer.jsx +++ b/client/src/components/game.footer.jsx @@ -9,7 +9,6 @@ const addState = connect( ws, game, account, - resolution, showNav, } = state; @@ -25,7 +24,6 @@ const addState = connect( return { game, account, - resolution, sendInstanceState, sendGameReady, showNav, @@ -55,7 +53,6 @@ function GameFooter(props) { const { game, account, - resolution, showNav, quit, @@ -88,14 +85,6 @@ function GameFooter(props) { ); - const skipBtn = ( - - ); - - const readyBtn = ( - {resolution && skipBtn} {game.phase === 'Finish' && quitBtn } - {!resolution && game.phase === 'Skill' && readyBtn } + {game.phase === 'Skill' && readyBtn } ); } diff --git a/client/src/events.jsx b/client/src/events.jsx index a6718ee1..034704f4 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -84,7 +84,6 @@ function registerEvents(store) { store.dispatch(actions.setAnimating(false)); store.dispatch(actions.setSkip(false)); - store.dispatch(actions.setResolution(null)); // set the game state so resolutions don't fire twice store.dispatch(actions.setGame(game)); diff --git a/client/src/reducers.jsx b/client/src/reducers.jsx index 08743393..f816befd 100644 --- a/client/src/reducers.jsx +++ b/client/src/reducers.jsx @@ -40,7 +40,6 @@ module.exports = { ping: createReducer(null, 'SET_PING'), player: createReducer(null, 'SET_PLAYER'), reclaiming: createReducer(false, 'SET_RECLAIMING'), - resolution: createReducer(null, 'SET_RESOLUTION'), skip: createReducer(false, 'SET_SKIP'), shop: createReducer(false, 'SET_SHOP'),