|
1 | 1 | <template> |
2 | | - <div :class="{'bot-substitution-intent': botSubstitutionIntent}"> |
| 2 | + <div class="teamStatus" :class="{'bot-substitution-intent': botSubstitutionIntent}"> |
3 | 3 | <div :class="{'team-yellow': color === 'yellow', 'team-blue': color === 'blue'}" class="team-name"> |
4 | 4 | <div class="team-name-text">{{team.name}}</div> |
5 | 5 | </div> |
6 | 6 |
|
7 | 7 | <img :src="logoUrl" alt="team logo" class="team-logo"/> |
8 | 8 |
|
9 | | - <hr class="logo-card-separator"> |
10 | | - |
11 | 9 | <div class="cards"> |
12 | 10 | <Card color="red" :num-cards="team.redCards"/> |
13 | 11 | <span> | </span> |
14 | 12 | <Card color="yellow" |
15 | 13 | :class="{'marked-card': markYellowCard}" |
16 | 14 | :num-cards="team.yellowCards"/> |
| 15 | + <span> | </span> |
| 16 | + <span class="botinfo"> |
| 17 | + <img class="boticon" src="bot.png"/> |
| 18 | + {{team.maxAllowedBots}} |
| 19 | + </span> |
| 20 | + <div class="cardTimers"> |
| 21 | + <CardTimer v-for="cardTime in team.yellowCardTimes.slice(0,3)" |
| 22 | + :cardTimer="cardTime" /> |
| 23 | + |
| 24 | + <div class="additional-cards" v-if="team.yellowCardTimes.length > 3"> + {{ team.yellowCardTimes.length - 3}} more </div> |
| 25 | + </div> |
17 | 26 | </div> |
18 | 27 | </div> |
19 | 28 | </template> |
|
22 | 31 | import {Referee} from "@/sslProto" |
23 | 32 | import teamLogoUrl from "@/teamLogoUrl" |
24 | 33 | import Card from "./Card"; |
| 34 | + import CardTimer from "./CardTimer"; |
25 | 35 |
|
26 | 36 | export default { |
27 | 37 | name: "TeamStatus", |
28 | | - components: {Card}, |
| 38 | + components: {Card, CardTimer}, |
29 | 39 | props: { |
30 | 40 | color: String, |
31 | 41 | team: Referee.ITeamInfo, |
|
46 | 56 |
|
47 | 57 | <style scoped> |
48 | 58 |
|
| 59 | + .teamStatus { |
| 60 | + transition: background-color 500ms ease; |
| 61 | +
|
| 62 | + } |
| 63 | +
|
49 | 64 | .bot-substitution-intent { |
50 | 65 | background-color: #c2c3d0; |
51 | 66 | } |
52 | 67 |
|
53 | 68 | .team-name { |
54 | | - height: 15vh; |
| 69 | + height: 12vh; |
55 | 70 | display: flex; |
56 | 71 | flex-direction: column; |
57 | 72 | justify-content: flex-end; |
58 | 73 | } |
59 | 74 |
|
60 | 75 | .team-logo { |
61 | | - max-width: 20vw; |
62 | | - max-height: 30vh; |
| 76 | + max-width: 27vw; |
| 77 | + max-height: 27vh; |
63 | 78 | } |
64 | 79 |
|
65 | 80 | .marked-card { |
66 | 81 | border-color: yellow; |
67 | 82 | } |
68 | 83 |
|
69 | | - .cards { |
70 | | - vertical-align: middle; |
71 | | - } |
72 | | -
|
73 | 84 | .inline { |
74 | 85 | display: inline; |
75 | 86 | } |
|
78 | 89 | margin: 0.2em; |
79 | 90 | } |
80 | 91 |
|
| 92 | + .cardTimers { |
| 93 | + margin-top: 6px; |
| 94 | + display: block; |
| 95 | + } |
| 96 | +
|
| 97 | +
|
| 98 | + .boticon { |
| 99 | + height: 4.5vmin; |
| 100 | + vertical-align: middle; |
| 101 | + } |
| 102 | +
|
| 103 | + .botinfo { |
| 104 | + display: inline-block; |
| 105 | + border-style: dotted; |
| 106 | + border-width: 0.4vh; |
| 107 | + min-width: 130px; |
| 108 | + height: 7vmin; |
| 109 | + } |
| 110 | +
|
| 111 | + .additional-cards { |
| 112 | + font-size: 24pt; |
| 113 | + color: yellow; |
| 114 | + } |
81 | 115 | </style> |
0 commit comments