added parsed check to scoreboard, added team color vars + team-colors in damage-chart
This commit is contained in:
@@ -3,10 +3,6 @@
|
|||||||
|
|
||||||
// Default variable overrides
|
// Default variable overrides
|
||||||
$font-family-base: 'Roboto';
|
$font-family-base: 'Roboto';
|
||||||
//$primary: #292c34;
|
|
||||||
//$secondary: #23262d;
|
|
||||||
//$body-bg: #2e3139;
|
|
||||||
//$blue: #4a90e2;
|
|
||||||
$body-color: white;
|
$body-color: white;
|
||||||
|
|
||||||
$primary: #888f98;
|
$primary: #888f98;
|
||||||
@@ -27,4 +23,13 @@ $success: #609926;
|
|||||||
|
|
||||||
// Bootstrap
|
// Bootstrap
|
||||||
@import "../node_modules/bootstrap/scss/bootstrap";
|
@import "../node_modules/bootstrap/scss/bootstrap";
|
||||||
@import "../node_modules/@fortawesome/fontawesome-free/css/all.css";
|
@import "../node_modules/@fortawesome/fontawesome-free/css/all.css";
|
||||||
|
|
||||||
|
:root {
|
||||||
|
// CSGO COLORS
|
||||||
|
--csgo-Orange: #FE9A28;
|
||||||
|
--csgo-Blue: #5BA7FE;
|
||||||
|
--csgo-Yellow: #F7F52F;
|
||||||
|
--csgo-Purple: #A01BEF;
|
||||||
|
--csgo-Green: #04B462;
|
||||||
|
}
|
||||||
|
@@ -46,11 +46,21 @@ export default {
|
|||||||
let arr = []
|
let arr = []
|
||||||
if (team === 1) {
|
if (team === 1) {
|
||||||
for (let i = 0; i < 5; i++) {
|
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 {
|
} else {
|
||||||
for (let i = 5; i < stats.length; i++) {
|
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()
|
arr.reverse()
|
||||||
@@ -76,11 +86,21 @@ export default {
|
|||||||
let arr = []
|
let arr = []
|
||||||
if (team === 1) {
|
if (team === 1) {
|
||||||
for (let i = 0; i < 5; i++) {
|
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 {
|
} else {
|
||||||
for (let i = 5; i < stats.length; i++) {
|
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()
|
arr.reverse()
|
||||||
@@ -139,7 +159,6 @@ export default {
|
|||||||
name: 'Enemy',
|
name: 'Enemy',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
stack: 'Total',
|
stack: 'Total',
|
||||||
color: ['orange'],
|
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'inside'
|
position: 'inside'
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
<th class="player__deaths">D</th>
|
<th class="player__deaths">D</th>
|
||||||
<th class="player__diff cursor__help" title="Kill death difference">+/-</th>
|
<th class="player__diff cursor__help" title="Kill death difference">+/-</th>
|
||||||
<th class="player__kd">K/D</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__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__rating cursor__help" title="Estimated HLTV Rating 1.0">Rating</th>
|
||||||
<th class="player__mvp cursor__help" title="Most valuable player">MVP</th>
|
<th class="player__mvp cursor__help" title="Most valuable player">MVP</th>
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
:rounds_played="props.rounds_played"
|
:rounds_played="props.rounds_played"
|
||||||
:color="player.extended?.color"
|
:color="player.extended?.color"
|
||||||
:tracked="player.player.tracked"
|
:tracked="player.player.tracked"
|
||||||
|
:parsed="props.parsed"
|
||||||
/>
|
/>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -81,6 +82,11 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
default: 0
|
default: 0
|
||||||
},
|
},
|
||||||
|
parsed: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
return {props}
|
return {props}
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
<td class="player__kd">
|
<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>
|
||||||
<td class="player__adr">
|
<td class="player__adr" v-if="props.parsed">
|
||||||
{{ (props.dmg / props.rounds_played).toFixed(2) }}
|
{{ (props.dmg / props.rounds_played).toFixed(2) }}
|
||||||
</td>
|
</td>
|
||||||
<td class="player__hs">
|
<td class="player__hs">
|
||||||
@@ -147,6 +147,11 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: true,
|
required: true,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
parsed: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
@@ -160,19 +165,19 @@ export default {
|
|||||||
outline: 3px solid;
|
outline: 3px solid;
|
||||||
}
|
}
|
||||||
.team-color-Orange {
|
.team-color-Orange {
|
||||||
outline-color: #FE9A28;
|
outline-color: var(--csgo-orange);
|
||||||
}
|
}
|
||||||
.team-color-Blue {
|
.team-color-Blue {
|
||||||
outline-color: #5BA7FE;
|
outline-color: var(--csgo-blue);
|
||||||
}
|
}
|
||||||
.team-color-Yellow {
|
.team-color-Yellow {
|
||||||
outline-color: #F7F52F;
|
outline-color: var(--csgo-yellow);
|
||||||
}
|
}
|
||||||
.team-color-Purple {
|
.team-color-Purple {
|
||||||
outline-color: #A01BEF;
|
outline-color: var(--csgo-purple);
|
||||||
}
|
}
|
||||||
.team-color-Green {
|
.team-color-Green {
|
||||||
outline-color: #04B462;
|
outline-color: var(--csgo-green);
|
||||||
}
|
}
|
||||||
.team-color-Grey {
|
.team-color-Grey {
|
||||||
outline: none;
|
outline: none;
|
||||||
|
@@ -37,13 +37,13 @@
|
|||||||
<ul class="list-unstyled d-flex m-auto">
|
<ul class="list-unstyled d-flex m-auto">
|
||||||
<li class="list-item scoreboard active" @click.prevent="ActivateScoreInfo('scoreboard')">Scoreboard</li>
|
<li class="list-item scoreboard active" @click.prevent="ActivateScoreInfo('scoreboard')">Scoreboard</li>
|
||||||
<li :class="!data.matchDetails.parsed ? 'disabled' : ''" class="list-item flashes"
|
<li :class="!data.matchDetails.parsed ? 'disabled' : ''" class="list-item flashes"
|
||||||
@click.prevent="data.matchDetails.parsed ? ActivateScoreInfo('flashes') : null">Flashes
|
@click.prevent="data.matchDetails.parsed ? ActivateScoreInfo('flashes') : null" :title="!data.matchDetails.parsed ? 'This demo has not been parsed' : ''">Flashes
|
||||||
</li>
|
</li>
|
||||||
<li :class="!data.matchDetails.parsed ? 'disabled' : ''" class="list-item utility"
|
<li :class="!data.matchDetails.parsed ? 'disabled' : ''" class="list-item utility"
|
||||||
@click.prevent="data.matchDetails.parsed ? ActivateScoreInfo('utility') : null">Utility
|
@click.prevent="data.matchDetails.parsed ? ActivateScoreInfo('utility') : null" :title="!data.matchDetails.parsed ? 'This demo has not been parsed' : ''">Utility
|
||||||
</li>
|
</li>
|
||||||
<li :class="!data.matchDetails.parsed ? 'disabled' : ''" class="list-item damage"
|
<li :class="!data.matchDetails.parsed ? 'disabled' : ''" class="list-item damage"
|
||||||
@click.prevent="data.matchDetails.parsed ? ActivateScoreInfo('damage') : null">Damage
|
@click.prevent="data.matchDetails.parsed ? ActivateScoreInfo('damage') : null" :title="!data.matchDetails.parsed ? 'This demo has not been parsed' : ''">Damage
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -54,12 +54,12 @@
|
|||||||
:rounds="data.matchDetails.max_rounds ? data.matchDetails.max_rounds : data.score[data.matchDetails.match_result - 1] === 16 ? 30 : data.score[data.matchDetails.match_result - 1] === 15 ? 30 : 16"
|
:rounds="data.matchDetails.max_rounds ? data.matchDetails.max_rounds : data.score[data.matchDetails.match_result - 1] === 16 ? 30 : data.score[data.matchDetails.match_result - 1] === 15 ? 30 : 16"
|
||||||
:rounds_played="data.score.reduce((a, b) => a + b)"
|
:rounds_played="data.score.reduce((a, b) => a + b)"
|
||||||
:score="data.score[0]"
|
:score="data.score[0]"
|
||||||
:stats="data.stats" :team_id="1"/>
|
:stats="data.stats" :team_id="1" :parsed="data.matchDetails.parsed" />
|
||||||
<ScoreTeam
|
<ScoreTeam
|
||||||
:rounds="data.matchDetails.max_rounds ? data.matchDetails.max_rounds : data.score.reduce((a, b) => a + b) >= 16 ? 30 : 16"
|
:rounds="data.matchDetails.max_rounds ? data.matchDetails.max_rounds : data.score.reduce((a, b) => a + b) >= 16 ? 30 : 16"
|
||||||
:rounds_played="data.score.reduce((a, b) => a + b)"
|
:rounds_played="data.score.reduce((a, b) => a + b)"
|
||||||
:score="data.score[1]"
|
:score="data.score[1]"
|
||||||
:stats="data.stats" :team_id="2"/>
|
:stats="data.stats" :team_id="2" :parsed="data.matchDetails.parsed" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="flashes">
|
<div id="flashes">
|
||||||
|
@@ -198,7 +198,7 @@ import {
|
|||||||
FormatDuration,
|
FormatDuration,
|
||||||
FormatFullDate,
|
FormatFullDate,
|
||||||
FormatFullDuration,
|
FormatFullDuration,
|
||||||
GetHLTV_1,
|
GetHLTV_1, GoToLink,
|
||||||
GoToMatch,
|
GoToMatch,
|
||||||
LoadImage,
|
LoadImage,
|
||||||
SaveLastVisitedToLocalStorage
|
SaveLastVisitedToLocalStorage
|
||||||
@@ -262,7 +262,7 @@ export default {
|
|||||||
|
|
||||||
LoadImage(data.matches[0].map ? data.matches[0].map : 'random')
|
LoadImage(data.matches[0].map ? data.matches[0].map : 'random')
|
||||||
|
|
||||||
console.log(response.data)
|
// console.log(response.data)
|
||||||
|
|
||||||
let player = {
|
let player = {
|
||||||
'steamid64': response.data.steamid64,
|
'steamid64': response.data.steamid64,
|
||||||
@@ -274,7 +274,10 @@ export default {
|
|||||||
document.title = `${response.data.name} | csgoWTF`
|
document.title = `${response.data.name} | csgoWTF`
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log(e);
|
if (e.response.status === 404) {
|
||||||
|
GoToLink('/')
|
||||||
|
}
|
||||||
|
// console.log(e.response.status, e.response.statusText);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user