fixed #10
This commit is contained in:
@@ -1,15 +1,27 @@
|
||||
<template>
|
||||
<td class="player__vac">
|
||||
<div v-if="!props.vac && !props.game_ban" class="vac-placeholder"></div>
|
||||
<img v-if="!props.game_ban && props.vac && FormatVacDate(props.vac_date, store.state.matchDetails.date) !== ''"
|
||||
:title="'Vac-banned: ' + FormatVacDate(props.vac_date, store.state.matchDetails.date)"
|
||||
alt="VAC-Ban"
|
||||
src="../assets/images/icons/vac_banned.svg">
|
||||
<img v-if="!props.vac && props.game_ban && FormatVacDate(props.game_ban_date, store.state.matchDetails.date) !== ''"
|
||||
:title="'Game-banned: ' + FormatVacDate(props.game_ban_date, store.state.matchDetails.date)"
|
||||
alt="Game-Ban"
|
||||
src="../assets/images/icons/game_banned.svg">
|
||||
</td>
|
||||
<td>
|
||||
<img :src="constructAvatarUrl(props.avatar)" alt="Player avatar" class="player__avatar" :class="'team-color-' + props.color">
|
||||
<img :class="'team-color-' + props.color" :src="constructAvatarUrl(props.avatar)" alt="Player avatar"
|
||||
class="player__avatar">
|
||||
</td>
|
||||
<td class="player__name" @click="GoToPlayer(props.steamid64)">
|
||||
<i class="far fa-dot-circle text-success tracked" v-if="props.tracked" title="Tracked user"></i>
|
||||
<i v-if="props.tracked" class="far fa-dot-circle text-success tracked" title="Tracked user"></i>
|
||||
{{ props.name }}
|
||||
<i class="fas fa-link"></i>
|
||||
</td>
|
||||
<td>
|
||||
<img :src="DisplayRank(props.rank)[0]"
|
||||
:alt="DisplayRank(props.rank)[1]"
|
||||
<img :alt="DisplayRank(props.rank)[1]"
|
||||
:src="DisplayRank(props.rank)[0]"
|
||||
:title="DisplayRank(props.rank)[1]"
|
||||
class="player__rank">
|
||||
</td>
|
||||
@@ -26,9 +38,11 @@
|
||||
{{ props.kdiff }}
|
||||
</td>
|
||||
<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 }}
|
||||
{{
|
||||
(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" v-if="props.parsed">
|
||||
<td v-if="props.parsed" class="player__adr">
|
||||
{{ (props.dmg / props.rounds_played).toFixed(2) }}
|
||||
</td>
|
||||
<td class="player__hs">
|
||||
@@ -40,15 +54,16 @@
|
||||
}}
|
||||
</td>
|
||||
<td class="player__mvp">
|
||||
{{props.mvp}}
|
||||
{{ props.mvp }}
|
||||
</td>
|
||||
<td class="player__score">
|
||||
{{props.player_score}}
|
||||
{{ props.player_score }}
|
||||
</td>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {DisplayRank, GetHLTV_1, GoToPlayer, constructAvatarUrl} from "../utils";
|
||||
import {constructAvatarUrl, DisplayRank, FormatVacDate, GetHLTV_1, GoToPlayer} from "../utils";
|
||||
import {useStore} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'ScoreTeamPlayer',
|
||||
@@ -152,15 +167,36 @@ export default {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false
|
||||
},
|
||||
vac: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false
|
||||
},
|
||||
vac_date: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0
|
||||
},
|
||||
game_ban: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false
|
||||
},
|
||||
game_ban_date: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
setup(props) {
|
||||
return {props, GetHLTV_1, GoToPlayer, DisplayRank, constructAvatarUrl}
|
||||
const store = useStore()
|
||||
return {props, GetHLTV_1, GoToPlayer, DisplayRank, constructAvatarUrl, FormatVacDate, store}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.team-color-blue,
|
||||
.team-color-orange,
|
||||
.team-color-green,
|
||||
@@ -168,25 +204,43 @@ export default {
|
||||
.team-color-yellow {
|
||||
outline: 3px solid;
|
||||
}
|
||||
|
||||
.team-color-orange {
|
||||
outline-color: var(--csgo-orange);
|
||||
}
|
||||
|
||||
.team-color-blue {
|
||||
outline-color: var(--csgo-blue);
|
||||
}
|
||||
|
||||
.team-color-yellow {
|
||||
outline-color: var(--csgo-yellow);
|
||||
}
|
||||
|
||||
.team-color-purple {
|
||||
outline-color: var(--csgo-purple);
|
||||
}
|
||||
|
||||
.team-color-green {
|
||||
outline-color: var(--csgo-green);
|
||||
}
|
||||
|
||||
.team-color-grey {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.player__vac,
|
||||
.vac-placeholder {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.player__vac {
|
||||
img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.player__avatar {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
|
Reference in New Issue
Block a user