forked from CSGOWTF/csgowtf
added parsed check to scoreboard, added team color vars + team-colors in damage-chart
This commit is contained in:
@@ -46,11 +46,21 @@ export default {
|
||||
let arr = []
|
||||
if (team === 1) {
|
||||
for (let i = 0; i < 5; i++) {
|
||||
arr.push(truncate(stats[i].player.name, 10))
|
||||
arr.push({
|
||||
value: truncate(stats[i].player.name, 10),
|
||||
textStyle: {
|
||||
color: 'white'
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
for (let i = 5; i < stats.length; i++) {
|
||||
arr.push(truncate(stats[i].player.name, 10))
|
||||
arr.push({
|
||||
value: truncate(stats[i].player.name, 10),
|
||||
textStyle: {
|
||||
color: 'white'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
arr.reverse()
|
||||
@@ -76,11 +86,21 @@ export default {
|
||||
let arr = []
|
||||
if (team === 1) {
|
||||
for (let i = 0; i < 5; i++) {
|
||||
arr.push(checkStatEmpty(stats[i].extended.dmg.enemy))
|
||||
arr.push({
|
||||
value: checkStatEmpty(stats[i].extended.dmg.enemy),
|
||||
itemStyle: {
|
||||
color: getComputedStyle(document.documentElement).getPropertyValue(`--csgo-${stats[i].extended.color}`)
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
for (let i = 5; i < stats.length; i++) {
|
||||
arr.push(checkStatEmpty(stats[i].extended.dmg.enemy))
|
||||
arr.push({
|
||||
value: checkStatEmpty(stats[i].extended.dmg.enemy),
|
||||
itemStyle: {
|
||||
color: getComputedStyle(document.documentElement).getPropertyValue(`--csgo-${stats[i].extended.color}`)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
arr.reverse()
|
||||
@@ -139,7 +159,6 @@ export default {
|
||||
name: 'Enemy',
|
||||
type: 'bar',
|
||||
stack: 'Total',
|
||||
color: ['orange'],
|
||||
label: {
|
||||
show: true,
|
||||
position: 'inside'
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<th class="player__deaths">D</th>
|
||||
<th class="player__diff cursor__help" title="Kill death difference">+/-</th>
|
||||
<th class="player__kd">K/D</th>
|
||||
<th class="player__adr cursor__help" title="Average damage per round">ADR</th>
|
||||
<th class="player__adr cursor__help" title="Average damage per round" v-if="props.parsed">ADR</th>
|
||||
<th class="player__hs cursor__help" title="Percentage of kills with a headshot">HS%</th>
|
||||
<th class="player__rating cursor__help" title="Estimated HLTV Rating 1.0">Rating</th>
|
||||
<th class="player__mvp cursor__help" title="Most valuable player">MVP</th>
|
||||
@@ -42,6 +42,7 @@
|
||||
:rounds_played="props.rounds_played"
|
||||
:color="player.extended?.color"
|
||||
:tracked="player.player.tracked"
|
||||
:parsed="props.parsed"
|
||||
/>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -81,6 +82,11 @@ export default {
|
||||
required: true,
|
||||
default: 0
|
||||
},
|
||||
parsed: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
setup(props) {
|
||||
return {props}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<td class="player__kd">
|
||||
{{ (props.kills > 0 && props.deaths > 0) ? (props.kills / props.deaths).toFixed(2) : (props.kills > 0 && props.deaths === 0) ? props.kills : 0.00 }}
|
||||
</td>
|
||||
<td class="player__adr">
|
||||
<td class="player__adr" v-if="props.parsed">
|
||||
{{ (props.dmg / props.rounds_played).toFixed(2) }}
|
||||
</td>
|
||||
<td class="player__hs">
|
||||
@@ -147,6 +147,11 @@ export default {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false
|
||||
},
|
||||
parsed: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
setup(props) {
|
||||
@@ -160,19 +165,19 @@ export default {
|
||||
outline: 3px solid;
|
||||
}
|
||||
.team-color-Orange {
|
||||
outline-color: #FE9A28;
|
||||
outline-color: var(--csgo-orange);
|
||||
}
|
||||
.team-color-Blue {
|
||||
outline-color: #5BA7FE;
|
||||
outline-color: var(--csgo-blue);
|
||||
}
|
||||
.team-color-Yellow {
|
||||
outline-color: #F7F52F;
|
||||
outline-color: var(--csgo-yellow);
|
||||
}
|
||||
.team-color-Purple {
|
||||
outline-color: #A01BEF;
|
||||
outline-color: var(--csgo-purple);
|
||||
}
|
||||
.team-color-Green {
|
||||
outline-color: #04B462;
|
||||
outline-color: var(--csgo-green);
|
||||
}
|
||||
.team-color-Grey {
|
||||
outline: none;
|
||||
|
||||
Reference in New Issue
Block a user