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