fixed #41
All checks were successful
CSGOWTF/csgowtf/pipeline/head This commit looks good

This commit is contained in:
2022-02-03 15:15:14 +01:00
parent 7114ca2479
commit d134d03fb7
2 changed files with 9 additions and 25 deletions

View File

@@ -75,7 +75,6 @@ export default {
let arr = []
for (const o of chat) {
for (const p of store.state.matchDetails.stats) {
console.log(p)
if (o.player === p.player.steamid64) {
const obj = Object.assign({
player: p.player.name,

View File

@@ -129,9 +129,9 @@
replace>Damage
</router-link>
</li>
<li :title="!data.matchDetails.parsed ? 'This demo has not been parsed' : ''"
<li :title="!data.matchDetails.parsed ? 'This demo has not been parsed' : data.matchDetails.date < 1643410799 ? 'This feature wasn\'t available for this match' : ''"
class="list-item nav-item">
<router-link :class="!data.matchDetails.parsed ? 'disabled' : ''" :disabled="!data.matchDetails.parsed"
<router-link :class="!data.matchDetails.parsed ? 'disabled' : data.matchDetails.date < 1643410799 ? 'disabled' : ''" :disabled="!data.matchDetails.parsed"
:to="'/match/' + data.matchDetails.match_id + '/chat-history'" class="nav-link"
replace>Chat-History
</router-link>
@@ -255,8 +255,12 @@ export default {
const checkRoute = () => {
if (route.fullPath.split('/')[3]) {
const sub = route.fullPath.split('/')[3]
if (matchIdPattern.test(props.match_id))
if (matchIdPattern.test(props.match_id)) {
if (store.state.matchDetails.date > 1643410799)
GoToLink(`/match/${props.match_id}/${sub}`)
else
GoToLink(`/match/${props.match_id}`)
}
else {
errorHandling(404)
}
@@ -269,25 +273,6 @@ export default {
}
}
const checkWin = (team) => {
team -= 1
if (data.matchDetails.max_rounds === 16) {
if (data.score[team] === 9)
return 'text-success'
else if (data.score[team] === 8)
return 'text-warning'
else if (data.score[team] < 8)
return 'text-danger'
} else {
if (data.score[team] === 16)
return 'text-success'
else if (data.score[team] === 15)
return 'text-warning'
else if (data.score[team] < 15)
return 'text-danger'
}
}
const getTeamAvgRank = (team) => {
let arr = []
for (let i = (team - 1) * 5; i < team * 5; i++) {
@@ -361,7 +346,7 @@ export default {
})
return {
data, DisplayRank, FormatFullDate, FormatDuration, FixMapName, route, pHeight, checkWin, handleDownloadMenu, getTeamAvgRank
data, DisplayRank, FormatFullDate, FormatDuration, FixMapName, route, pHeight, handleDownloadMenu, getTeamAvgRank
}
}
}