stuff for mobile

This commit is contained in:
ntr 2019-05-03 19:25:14 +10:00
parent bd572575c6
commit 5cfd3db4c6
4 changed files with 17 additions and 17 deletions

View File

@ -404,7 +404,7 @@ header {
height: 0.25em; height: 0.25em;
border: none; border: none;
margin: 0.5em 0; margin: 1em 0;
} }
.timer { .timer {
@ -739,7 +739,7 @@ table td svg {
color: whitesmoke; color: whitesmoke;
} }
.game-cryp button[disabled] { .game-cryp button[disabled], .game-cryp button[disabled]:hover {
color: #333333; color: #333333;
font-size: 14pt; font-size: 14pt;
text-decoration: line-through text-decoration: line-through
@ -908,7 +908,7 @@ CRYP DAMAGE
main { main {
flex: 1 1 auto; flex: 1 1 auto;
flex-flow: column; flex-flow: column;
overflow: hidden; overflow-x: hidden;
} }
main.game { main.game {
@ -1014,15 +1014,6 @@ CRYP DAMAGE
width: 100%; width: 100%;
} }
.mobile-spacer {
flex: 1 1 25%;
flex-flow: column;
display: block;
height: 95%;
padding: 0 2em 0 2em;
justify-content: center;
}
.game .timer-container { .game .timer-container {
order: 5; order: 5;
flex: unset; flex: unset;

View File

@ -89,9 +89,19 @@ function GamePanel(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
? 0
: Math.min(timerPct, 100);
const displayColour = playerTeam.ready
? 'forestgreen'
: timerPct > 80
? 'red'
: 'whitesmoke';
const timerStyles = { const timerStyles = {
width: `${timerPct < 100 && !resolution ? timerPct : 0}%`, width: `${displayPct}%`,
background: playerTeam.ready ? 'forestgreen' : 'whitesmoke', background: displayColour,
}; };
const timer = ( const timer = (
@ -169,7 +179,6 @@ function GamePanel(props) {
{header} {header}
{timer} {timer}
{PlayerTeam(playerTeam, setActiveSkill)} {PlayerTeam(playerTeam, setActiveSkill)}
<div className="mobile-spacer">&nbsp;</div>
<TargetingArrows /> <TargetingArrows />
{otherTeams.map(OpponentTeam)} {otherTeams.map(OpponentTeam)}
</main> </main>

View File

@ -53,7 +53,7 @@ function Skill(props) {
: ''; : '';
const cdText = cryp.skills[i].cd > 0 const cdText = cryp.skills[i].cd > 0
? `- ${s.cd}` ? `- ${s.cd}T`
: ''; : '';
const highlight = activeSkill const highlight = activeSkill

View File

@ -56,7 +56,7 @@ function TargetSvg(args) {
: outgoing.map(getPath); : outgoing.map(getPath);
return ( return (
<svg viewBox="0 0 900 900" preserveAspectRatio="none" className="target-svg"> <svg viewBox="0 0 900 900" preserveAspectRatio="none" className="target-svg" transform='rotate(-90)'>
{arrows} {arrows}
</svg> </svg>
); );