File tree 4 files changed +35
-2
lines changed
top-bar/center/current-round/clock
4 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 247
247
"label" : " Show map name and screenshot in the Series Graph, even if there is only a single match in the series"
248
248
},
249
249
250
+ "preferences.topBar.clock.tenSecondsRedInFreezetime" : {
251
+ "type" : " boolean" ,
252
+ "fallback" : false ,
253
+ "section" : " Preferences" ,
254
+ "label" : " Show clock in red at less than 10 seconds in Freezetime"
255
+ },
256
+
257
+ "preferences.topBar.clock.tenSecondsRedInTacticalTimeout" : {
258
+ "type" : " boolean" ,
259
+ "fallback" : false ,
260
+ "section" : " Preferences" ,
261
+ "label" : " Show clock in red at less than 10 seconds during Tactical Timeouts"
262
+ },
263
+
264
+ "preferences.topBar.clock.tenSecondsRedInRoundRestartDelay" : {
265
+ "type" : " boolean" ,
266
+ "fallback" : false ,
267
+ "section" : " Preferences" ,
268
+ "label" : " Show clock in red at less than 10 seconds after round end"
269
+ },
270
+
250
271
"css.base-scale-factor" : {
251
272
"type" : " text" ,
252
273
"section" : " Style Overrides" ,
Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ img.planted-bomb-icon {
8
8
font-size : 2.25rem ;
9
9
}
10
10
11
+ .clock .--red {
12
+ color : var (--red );
13
+ }
14
+
11
15
img .bombsite-icon {
12
16
height : 1.75rem ;
13
17
margin-left : 0.75rem ;
Original file line number Diff line number Diff line change 7
7
< img v-else-if ="$bomb.bombsite === 'b' " class ="bombsite-icon --b " src ="/hud/img/icons/bombsite-b.svg " alt ="">
8
8
</ div >
9
9
10
- <!-- TODO configurable: 10 seconds in red -->
11
- < div v-else class ="clock ">
10
+ < div v-else :class ="['clock', { '--red': isClockRed }] ">
12
11
< Digits :value ="clockMinutes " digits ="1 "> </ Digits > :< Digits :value ="clockSeconds " digits ="2 " pad ="0 "> </ Digits >
13
12
</ div >
Original file line number Diff line number Diff line change @@ -13,5 +13,14 @@ export default {
13
13
clockSeconds ( ) {
14
14
return Math . ceil ( this . $round . phaseEndsInSec % 60 )
15
15
} ,
16
+
17
+ isClockRed ( ) {
18
+ if ( this . $round . phase === 'freezetime' && ! this . $opts [ 'preferences.topBar.clock.tenSecondsRedInFreezetime' ] ) return false
19
+ if ( ( this . $round . phase === 'timeout_ct' || this . $round . phase === 'timeout_t' ) && ! this . $opts [ 'preferences.topBar.clock.tenSecondsRedInTacticalTimeout' ] ) return false
20
+ if ( this . $round . phase === 'over' && ! this . $opts [ 'preferences.topBar.clock.tenSecondsRedInRoundRestartDelay' ] ) return false
21
+
22
+ return this . clockMinutes === 0
23
+ && this . clockSeconds <= 10
24
+ } ,
16
25
} ,
17
26
}
You can’t perform that action at this time.
0 commit comments