updated frontend from typescript to javascript

This commit is contained in:
cnachtigall1991
2021-10-05 00:16:20 +02:00
parent 27edfd0cfe
commit 886f182ff2
41 changed files with 1183 additions and 28 deletions

View File

@@ -0,0 +1,71 @@
<template>
<table>
<thead>
<tr>
<th class="player__avatar"></th>
<th class="player__name"></th>
<th class="player__rank"></th>
<th class="player__kills cursor__help" title="Kills">K</th>
<th class="player__assist cursor__help" title="Assists">A</th>
<th class="player__deaths cursor__help" title="Deaths">D</th>
<th class="player__diff cursor__help" title="Kill death difference">+/-</th>
<th class="player__kd cursor__help" title="Kill death ratio">K/D</th>
<th class="player__adr cursor__help" title="Average damage per round">ADR</th>
<th class="player__hs cursor__help" title="Percentage of kills with a headshot">HS%</th>
<th class="player__kast cursor__help" title="Percentage of rounds with a Kill, Assist, Survived or Death Traded">
KAST
</th>
<th class="player__rating cursor__help" title="Estimated HLTV Rating 1.0">Rating</th>
</tr>
</thead>
<tbody v-for="player in props.stats" :key="player.player.steamid64">
<tr v-if="player.team_id === props.team_id" class="player">
<ScoreTeamPlayer
:assists="player.assists"
:avatar="player.player.avatar"
:deaths="player.deaths"
:dmg="player.extended?.dmg?.enemy"
:hs="player.headshot"
:kast="player.extended?.kast"
:kdiff="player.kills - player.deaths"
:kills="player.kills"
:mk_duo="player.extended?.multi_kills?.duo"
:mk_pent="player.extended?.multi_kills?.pent"
:mk_quad="player.extended?.multi_kills?.quad"
:mk_triple="player.extended?.multi_kills?.triple"
:name="player.player.name"
:rounds_played="props.rounds_played"
:rank="player.extended?.rank?.old"
/>
</tr>
</tbody>
</table>
</template>
<script>
import ScoreTeamPlayer from '@/components/ScoreTeamPlayer.vue'
export default {
name: 'ScoreTeam',
components: {ScoreTeamPlayer},
props: {
stats: {
type: Object,
required: true
},
rounds_played: {
type: Number,
required: true,
default: 0
},
team_id: {
type: Number,
required: true,
default: 1
}
},
setup(props) {
return {props}
}
}
</script>