2
2
<div v-if =" state !== null && champions !== null" class =" d-flex flex-column h-100" >
3
3
<div class =" row" style =" height : 65px ;" >
4
4
<div class =" col-5 bg-info d-flex justify-content-between align-items-baseline" >
5
- <h1 class =" d-inline-block" >{{ state.teams[0].name }}</h1 >
5
+ <h1 class =" d-inline-block text-nowrap overflow-hidden text-truncate " >{{ state.teams[0].name }}</h1 >
6
6
<h5 class =" d-inline-block" >{{ getTeamAction(0) }}</h5 >
7
7
</div >
8
- <div class =" col-2 d-flex justify-content-center" :class =" ['ready', 'done'].includes(currentAct) ? '' : (currentTeam === 0 ? 'blue-act-gradient' : 'red-act-gradient')" >
9
- <h1 >{{ currentAct === 'done' ? 'Done' : timer }}</h1 >
8
+ <div class =" col-2 d-flex justify-content-center" :class =" ['ready', 'done'].includes(currentAct) ? 'blue-red-gradient ' : (currentTeam === 0 ? 'blue-act-gradient' : 'red-act-gradient')" >
9
+ <h1 >{{ timer }}</h1 >
10
10
</div >
11
11
<div class =" col-5 bg-danger d-flex justify-content-between align-items-baseline" >
12
12
<h5 class =" d-inline-block" >{{ getTeamAction(1) }}</h5 >
13
- <h1 class =" d-inline-block" >{{ state.teams[1].name }}</h1 >
13
+ <h1 class =" d-inline-block text-nowrap overflow-hidden text-truncate " >{{ state.teams[1].name }}</h1 >
14
14
</div >
15
15
</div >
16
16
<div class =" row" style =" height : calc (100% - 65px - 80px );" >
17
- <champion-pick-list class =" col-xl-2 col-sm-3 bg-info p-3" :champions =" champions" :picks =" state.picks[0]" :hovered =" getHovered(0, 'pick')" ></champion-pick-list >
17
+ <champion-pick-list class =" col-xl-2 col-sm-3 bg-info p-3" :champions =" champions" :picks =" state.picks[0]" :hovered =" getHovered(0, 'pick')" :active = " getActive(0, 'pick') " ></champion-pick-list >
18
18
<div class =" col-xl-8 col-sm-6 overflow-hidden h-100" >
19
19
<champion-picker ref =" championPicker" :champions =" champions" :banned-ids =" bannedChampionIds" :picked-ids =" pickedChampionIds" :disabled =" team === null || ['ready', 'done'].includes(currentAct)" v-model =" input.champion" ></champion-picker >
20
20
</div >
21
- <champion-pick-list class =" col-xl-2 col-sm-3 bg-danger p-3" :champions =" champions" :picks =" state.picks[1]" :hovered =" getHovered(1, 'pick')" ></champion-pick-list >
21
+ <champion-pick-list class =" col-xl-2 col-sm-3 bg-danger p-3" :champions =" champions" :picks =" state.picks[1]" :hovered =" getHovered(1, 'pick')" :active = " getActive(1, 'pick') " ></champion-pick-list >
22
22
</div >
23
23
<div class =" row" style =" height : 80px ;" >
24
24
<div class =" col-5 bg-info d-flex justify-content-end" >
25
- <champion-ban-list :champions =" champions" :bans =" state.bans[0]" :team =" 0" :hovered =" getHovered(0, 'ban')" ></champion-ban-list >
25
+ <champion-ban-list :champions =" champions" :bans =" state.bans[0]" :team =" 0" :hovered =" getHovered(0, 'ban')" :active = " getActive(0, 'ban') " ></champion-ban-list >
26
26
</div >
27
27
<div class =" col-2" >
28
28
<div class =" py-3 h-100" >
29
29
<button type =" button" class =" rounded-0 btn w-100 h-100" :class =" ['ready', 'done'].includes(currentAct) ? 'btn-secondary' : (currentTeam === 0 ? 'btn-info' : 'btn-danger')" :disabled =" !canAct" @click =" lock" >{{ actButtonText }}</button >
30
30
</div >
31
31
</div >
32
32
<div class =" col-5 bg-danger d-flex justify-content-start" >
33
- <champion-ban-list :champions =" champions" :bans =" state.bans[1]" :team =" 1" :hovered =" getHovered(1, 'ban')" ></champion-ban-list >
33
+ <champion-ban-list :champions =" champions" :bans =" state.bans[1]" :team =" 1" :hovered =" getHovered(1, 'ban')" :active = " getActive(1, 'ban') " ></champion-ban-list >
34
34
</div >
35
35
</div >
36
36
</div >
@@ -126,6 +126,10 @@ export default {
126
126
});
127
127
},
128
128
129
+ getActive (team , act ) {
130
+ return this .currentTeam === team && this .currentAct === act;
131
+ },
132
+
129
133
getHovered (team , act ) {
130
134
if (this .currentTeam !== team || this .currentAct !== act) {
131
135
return null ;
@@ -152,6 +156,8 @@ export default {
152
156
153
157
endTimer () {
154
158
cancelAnimationFrame (this .timerFrame );
159
+ this .timerFrame = null ;
160
+ this .timer = null ;
155
161
},
156
162
157
163
hover (champion ) {
@@ -175,7 +181,6 @@ export default {
175
181
}
176
182
177
183
this .timer = displaySeconds;
178
-
179
184
this .timerFrame = requestAnimationFrame (updateTimer);
180
185
};
181
186
0 commit comments