forked from CSGOWTF/csgowtf
#5 added Hitgroup-Puppet to DamageSite
This commit is contained in:
@@ -14,10 +14,12 @@
|
||||
<div class="m-auto map">
|
||||
<img v-if="data.matchDetails.map" :alt="data.matchDetails.map"
|
||||
:src="require('../assets/images/map_icons/map_icon_' + data.matchDetails.map + '.svg')"
|
||||
:title="data.matchDetails.map" class="map-icon">
|
||||
:title="data.matchDetails.map" class="map-icon"
|
||||
>
|
||||
<img v-if="!data.matchDetails.map" :src="require('../assets/images/map_icons/map_icon_lobby_mapveto.svg')"
|
||||
alt="Map icon"
|
||||
class="map-icon" title="Map unknown">
|
||||
class="map-icon" title="Map unknown"
|
||||
>
|
||||
</div>
|
||||
<div v-if="route.fullPath.split('/')[3] !== 'overview'" class="score-team-2">
|
||||
<h1 :class="checkWin(2)" :style="data.score[1] < 10 ? 'padding-left: 20px;' : ''">{{ data.score[1] }}</h1>
|
||||
@@ -46,10 +48,10 @@
|
||||
<img v-if="data.matchDetails.parsed"
|
||||
:alt="DisplayRank(data.avgRank)[1]"
|
||||
:src="DisplayRank(data.avgRank)[0]"
|
||||
:title="DisplayRank(data.avgRank)[1]"
|
||||
:title="'Average Rank: ' + DisplayRank(data.avgRank)[1]"
|
||||
class="rank-icon"/>
|
||||
<span v-if="data.matchDetails.replay_url" class="text-muted px-2">—</span>
|
||||
<a v-if="data.matchDetails.replay_url" :href="data.matchDetails.replay_url" class="text-white">
|
||||
<a v-if="data.matchDetails.replay_url" :href="data.matchDetails.replay_url" class="text-white" title="Download Match">
|
||||
<i class="fas fa-download"></i>
|
||||
</a>
|
||||
</p>
|
||||
@@ -116,12 +118,13 @@
|
||||
import {onBeforeMount, onBeforeUnmount, onMounted, reactive, watch} from "vue";
|
||||
import {
|
||||
closeNav,
|
||||
CreatePlayersArray,
|
||||
DisplayRank,
|
||||
FixMapName,
|
||||
FormatDuration,
|
||||
FormatFullDate,
|
||||
GetAvgRank,
|
||||
getMatchDetails,
|
||||
GetMatchDetails,
|
||||
GoToLink,
|
||||
LoadImage
|
||||
} from "../utils";
|
||||
@@ -150,7 +153,7 @@ export default {
|
||||
// Functions
|
||||
const GetMatch = async () => {
|
||||
if (matchIdPattern.test(props.match_id)) {
|
||||
const res = await getMatchDetails(props.match_id)
|
||||
const res = await GetMatchDetails(props.match_id)
|
||||
|
||||
if (res.map)
|
||||
document.title = `${FixMapName(res.map)} | csgoWTF`
|
||||
@@ -168,6 +171,10 @@ export default {
|
||||
|
||||
LoadImage(data.matchDetails.map ? data.matchDetails.map : 'random')
|
||||
|
||||
store.commit({
|
||||
type: 'changePlayesArr',
|
||||
data: CreatePlayersArray(data.stats)
|
||||
})
|
||||
data.avgRank = GetAvgRank(data.stats)
|
||||
|
||||
console.log(data.matchDetails)
|
||||
|
||||
@@ -313,14 +313,14 @@ import {
|
||||
FormatFullDuration,
|
||||
FormatVacDate,
|
||||
GetHLTV_1,
|
||||
getPlayerMeta,
|
||||
GetPlayerMeta,
|
||||
GetUser,
|
||||
GetWinLoss,
|
||||
GoToLink,
|
||||
GoToMatch,
|
||||
GoToPlayer,
|
||||
LoadImage,
|
||||
loadMoreMatches,
|
||||
LoadMoreMatches,
|
||||
SaveLastVisitedToLocalStorage,
|
||||
setTitle,
|
||||
sortObjectValue,
|
||||
@@ -429,7 +429,7 @@ export default {
|
||||
}
|
||||
|
||||
const setMoreMatches = async () => {
|
||||
const res = await loadMoreMatches(store.state.playerDetails.steamid64, data.matches[data.matches.length - 1].date)
|
||||
const res = await LoadMoreMatches(store.state.playerDetails.steamid64, data.matches[data.matches.length - 1].date)
|
||||
|
||||
res.matches.forEach(e => data.matches.push(e))
|
||||
|
||||
@@ -446,7 +446,7 @@ export default {
|
||||
}, 2000)
|
||||
})
|
||||
|
||||
data.playerMeta = await getPlayerMeta(props.id, displayCounter)
|
||||
data.playerMeta = await GetPlayerMeta(props.id, displayCounter)
|
||||
}
|
||||
|
||||
const TrackPlayer = async () => {
|
||||
@@ -512,7 +512,7 @@ export default {
|
||||
|
||||
watch(() => props.id, async () => {
|
||||
await GetPlayer()
|
||||
data.playerMeta = await getPlayerMeta(props.id, displayCounter)
|
||||
data.playerMeta = await GetPlayerMeta(props.id, displayCounter)
|
||||
})
|
||||
|
||||
watch(() => data.playerMeta, () => {
|
||||
@@ -530,7 +530,7 @@ export default {
|
||||
wrapper.style.minHeight = height + 'px'
|
||||
|
||||
await GetPlayer()
|
||||
data.playerMeta = await getPlayerMeta(props.id, displayCounter)
|
||||
data.playerMeta = await GetPlayerMeta(props.id, displayCounter)
|
||||
})
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user