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%;
}
button.ready {
button.ready:enabled {
&:hover {
color: forestgreen;
border-color: forestgreen;

View File

@ -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;

View File

@ -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%;

View File

@ -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 });

View File

@ -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,

View File

@ -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 (
<aside class="controls">
<button class="ready" onClick={() => sendGameReady()}>Ready</button>
<button disabled={animating} class="ready" onClick={() => sendGameReady()}>Ready</button>
</aside>
);
}

View File

@ -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) {
</button>
);
const skipBtn = (
<button
onClick={skip}>
Skip
</button>
);
const readyBtn = (
<button
class={`${playerTeam.ready ? 'ready' : ''} ready-btn`}
@ -108,7 +97,7 @@ function GameFooter(props) {
const now = Date.now();
const end = Date.parse(game.phase_end);
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
: Math.min(timerPct, 100);
@ -135,9 +124,8 @@ function GameFooter(props) {
<footer>
{timer}
<button id="nav-btn" onClick={() => setShowNav(!showNav)} ></button>
{resolution && skipBtn}
{game.phase === 'Finish' && quitBtn }
{!resolution && game.phase === 'Skill' && readyBtn }
{game.phase === 'Skill' && readyBtn }
</footer>
);
}

View File

@ -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));

View File

@ -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'),