remove resolution

This commit is contained in:
ntr 2019-08-09 15:38:09 +10:00
parent ee032696da
commit b8d1c78f61
9 changed files with 32 additions and 69 deletions

View File

@ -9,7 +9,7 @@ aside {
font-size: 150%; font-size: 150%;
} }
button.ready { button.ready:enabled {
&:hover { &:hover {
color: forestgreen; color: forestgreen;
border-color: forestgreen; border-color: forestgreen;

View File

@ -40,7 +40,7 @@
.instance .info { .instance .info {
/*font-size: 75%;*/ /*font-size: 75%;*/
margin: 3em 0 0 1em; margin: 0 0 0 1em;
grid-area: info; grid-area: info;
display: flex; display: flex;
flex-flow: column; flex-flow: column;

View File

@ -450,30 +450,6 @@ header {
opacity: 0 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 { .play {
height: 100%; height: 100%;
display: grid; display: grid;
@ -485,28 +461,6 @@ header {
"team" "team"
"inventory"; "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 { .team {
grid-area: team; grid-area: team;
@ -514,14 +468,37 @@ header {
padding: 0.5em 2em 0 0; padding: 0.5em 2em 0 0;
margin-bottom: 2em; margin-bottom: 2em;
border-bottom: 0.1em solid whitesmoke; border-bottom: 0.1em solid whitesmoke;
} }
.menu-construct { .menu-construct {
flex: 1 0 33%; 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 { .menu-instance-btn {
flex: 1 1 100%; flex: 1 1 100%;

View File

@ -26,7 +26,6 @@ export const setNav = value => ({ type: 'SET_NAV', value });
export const setPing = value => ({ type: 'SET_PING', value }); export const setPing = value => ({ type: 'SET_PING', value });
export const setPlayer = value => ({ type: 'SET_PLAYER', value }); export const setPlayer = value => ({ type: 'SET_PLAYER', value });
export const setReclaiming = value => ({ type: 'SET_RECLAIMING', 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 setShowLog = value => ({ type: 'SET_SHOW_LOG', value });
export const setShowNav = value => ({ type: 'SET_SHOW_NAV', value }); export const setShowNav = value => ({ type: 'SET_SHOW_NAV', value });
export const setSkip = value => ({ type: 'SET_SKIP', value }); export const setSkip = value => ({ type: 'SET_SKIP', value });

View File

@ -18,7 +18,6 @@ const addState = connect(
account, account,
activeSkill, activeSkill,
animFocus, animFocus,
resolution,
animating, animating,
animText, animText,
} = state; } = state;
@ -37,7 +36,6 @@ const addState = connect(
return { return {
game, game,
account, account,
resolution,
animating, animating,
animFocus, animFocus,
animText, animText,

View File

@ -5,6 +5,7 @@ const addState = connect(
function receiveState(state) { function receiveState(state) {
const { const {
ws, ws,
animating,
game, game,
} = state; } = state;
@ -15,6 +16,7 @@ const addState = connect(
return { return {
game, game,
animating,
sendGameReady, sendGameReady,
}; };
}, },
@ -23,12 +25,13 @@ const addState = connect(
function Controls(args) { function Controls(args) {
const { const {
game, game,
animating,
sendGameReady sendGameReady
} = args; } = args;
return ( return (
<aside class="controls"> <aside class="controls">
<button class="ready" onClick={() => sendGameReady()}>Ready</button> <button disabled={animating} class="ready" onClick={() => sendGameReady()}>Ready</button>
</aside> </aside>
); );
} }

View File

@ -9,7 +9,6 @@ const addState = connect(
ws, ws,
game, game,
account, account,
resolution,
showNav, showNav,
} = state; } = state;
@ -25,7 +24,6 @@ const addState = connect(
return { return {
game, game,
account, account,
resolution,
sendInstanceState, sendInstanceState,
sendGameReady, sendGameReady,
showNav, showNav,
@ -55,7 +53,6 @@ function GameFooter(props) {
const { const {
game, game,
account, account,
resolution,
showNav, showNav,
quit, quit,
@ -88,14 +85,6 @@ function GameFooter(props) {
</button> </button>
); );
const skipBtn = (
<button
onClick={skip}>
Skip
</button>
);
const readyBtn = ( const readyBtn = (
<button <button
class={`${playerTeam.ready ? 'ready' : ''} ready-btn`} class={`${playerTeam.ready ? 'ready' : ''} ready-btn`}
@ -108,7 +97,7 @@ function GameFooter(props) {
const now = Date.now(); const now = Date.now();
const end = Date.parse(game.phase_end); const end = Date.parse(game.phase_end);
const timerPct = ((now - zero) / (end - zero) * 100); const timerPct = ((now - zero) / (end - zero) * 100);
const displayPct = resolution || game.phase === 'Finish' || !game.phase_end const displayPct = game.phase === 'Finish' || !game.phase_end
? 0 ? 0
: Math.min(timerPct, 100); : Math.min(timerPct, 100);
@ -135,9 +124,8 @@ function GameFooter(props) {
<footer> <footer>
{timer} {timer}
<button id="nav-btn" onClick={() => setShowNav(!showNav)} ></button> <button id="nav-btn" onClick={() => setShowNav(!showNav)} ></button>
{resolution && skipBtn}
{game.phase === 'Finish' && quitBtn } {game.phase === 'Finish' && quitBtn }
{!resolution && game.phase === 'Skill' && readyBtn } {game.phase === 'Skill' && readyBtn }
</footer> </footer>
); );
} }

View File

@ -84,7 +84,6 @@ function registerEvents(store) {
store.dispatch(actions.setAnimating(false)); store.dispatch(actions.setAnimating(false));
store.dispatch(actions.setSkip(false)); store.dispatch(actions.setSkip(false));
store.dispatch(actions.setResolution(null));
// set the game state so resolutions don't fire twice // set the game state so resolutions don't fire twice
store.dispatch(actions.setGame(game)); store.dispatch(actions.setGame(game));

View File

@ -40,7 +40,6 @@ module.exports = {
ping: createReducer(null, 'SET_PING'), ping: createReducer(null, 'SET_PING'),
player: createReducer(null, 'SET_PLAYER'), player: createReducer(null, 'SET_PLAYER'),
reclaiming: createReducer(false, 'SET_RECLAIMING'), reclaiming: createReducer(false, 'SET_RECLAIMING'),
resolution: createReducer(null, 'SET_RESOLUTION'),
skip: createReducer(false, 'SET_SKIP'), skip: createReducer(false, 'SET_SKIP'),
shop: createReducer(false, 'SET_SHOP'), shop: createReducer(false, 'SET_SHOP'),