Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4464d92e81 | ||
![]() |
1c178404ab | ||
f2a8e483c4 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "csgowtf",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
|
@@ -1,58 +1,63 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<meta content="IE=edge" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width,initial-scale=1.0" name="viewport">
|
||||
|
||||
<meta name="description"
|
||||
content="Open source CSGO data platform">
|
||||
<meta name="robots"
|
||||
content="index, follow, archive">
|
||||
<meta property="st:section"
|
||||
content="Open source CSGO data platform">
|
||||
<meta name="twitter:title"
|
||||
content="csgoWTF">
|
||||
<meta name="twitter:description"
|
||||
content="Open source CSGO data platform">
|
||||
<meta name="twitter:card"
|
||||
content="summary_large_image">
|
||||
<meta property="og:url"
|
||||
content="https://csgow.tf/">
|
||||
<meta property="og:title"
|
||||
content="csgoWTF">
|
||||
<meta property="og:description"
|
||||
content="Open source CSGO data platform">
|
||||
<meta property="og:type"
|
||||
content="website">
|
||||
<meta property="og:locale"
|
||||
content="en_US">
|
||||
<meta property="og:site_name"
|
||||
content="csgoWTF">
|
||||
<meta name="twitter:image"
|
||||
content="https://csgow.tf/logo.svg">
|
||||
<meta property="og:image"
|
||||
content="https://csgow.tf/logo.svg">
|
||||
<meta property="og:image:width"
|
||||
content="1024">
|
||||
<meta property="og:image:height"
|
||||
content="1024">
|
||||
<meta property="og:image:secure_url"
|
||||
content="https://csgow.tf/logo.svg">
|
||||
<meta content="Open source CSGO data platform"
|
||||
name="description">
|
||||
<meta content="index, follow, archive"
|
||||
name="robots">
|
||||
<meta content="Open source CSGO data platform"
|
||||
property="st:section">
|
||||
<meta content="csgoWTF"
|
||||
name="twitter:title">
|
||||
<meta content="Open source CSGO data platform"
|
||||
name="twitter:description">
|
||||
<meta content="summary_large_image"
|
||||
name="twitter:card">
|
||||
<meta content="https://csgow.tf/"
|
||||
property="og:url">
|
||||
<meta content="csgoWTF"
|
||||
property="og:title">
|
||||
<meta content="Open source CSGO data platform"
|
||||
property="og:description">
|
||||
<meta content="website"
|
||||
property="og:type">
|
||||
<meta content="en_US"
|
||||
property="og:locale">
|
||||
<meta content="csgoWTF"
|
||||
property="og:site_name">
|
||||
<meta content="https://csgow.tf/logo.svg"
|
||||
name="twitter:image">
|
||||
<meta content="https://csgow.tf/logo.svg"
|
||||
property="og:image">
|
||||
<meta content="1024"
|
||||
property="og:image:width">
|
||||
<meta content="1024"
|
||||
property="og:image:height">
|
||||
<meta content="https://csgow.tf/logo.svg"
|
||||
property="og:image:secure_url">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="<%= BASE_URL %>apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<%= BASE_URL %>favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<%= BASE_URL %>favicon-16x16.png">
|
||||
<link href="<%= BASE_URL %>apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180">
|
||||
<link href="<%= BASE_URL %>favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
|
||||
<link href="<%= BASE_URL %>favicon-16x16.png" rel="icon" sizes="16x16" type="image/png">
|
||||
|
||||
<link rel="manifest" href="<%= BASE_URL %>site.webmanifest">
|
||||
<link href="<%= BASE_URL %>site.webmanifest" rel="manifest">
|
||||
|
||||
<link href="https://steamcdn-a.akamaihd.net" rel="preload">
|
||||
<link href="https://api.csgow.tf" rel="preload">
|
||||
<link href="https://piwik.harting.hosting" rel="preload">
|
||||
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app" class="d-flex flex-column min-vh-100"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
|
||||
Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app" class="d-flex flex-column min-vh-100"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -215,8 +215,8 @@ export default {
|
||||
|
||||
data.stats = data.matchDetails.stats
|
||||
data.score = data.matchDetails.score
|
||||
data.team1Avg = getTeamAvgRank(1).reduce((a, b) => a + b) / 5
|
||||
data.team2Avg = getTeamAvgRank(2).reduce((a, b) => a + b) / 5
|
||||
data.team1Avg = Math.floor(getTeamAvgRank(1).reduce((a, b) => a + b) / 5)
|
||||
data.team2Avg = Math.floor(getTeamAvgRank(2).reduce((a, b) => a + b) / 5)
|
||||
|
||||
LoadImage(data.matchDetails.map ? data.matchDetails.map : 'random')
|
||||
|
||||
@@ -271,7 +271,7 @@ export default {
|
||||
const getTeamAvgRank = (team) => {
|
||||
let arr = []
|
||||
for (let i = (team - 1) * 5; i < team * 5; i++) {
|
||||
arr.push(data.matchDetails.stats[i].rank.old)
|
||||
arr.push(data.matchDetails.stats[i].rank?.old !== undefined ? data.matchDetails.stats[i].rank?.old : 0)
|
||||
}
|
||||
return arr
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<img alt="" class="bg-img" src="">
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="wrapper" :style="{minHeight: pHeight + 'px'}">
|
||||
<div class="container-lg">
|
||||
<div v-if="store.state.playerDetails.name">
|
||||
<div class="card mb-3 bg-transparent border-0">
|
||||
@@ -85,21 +85,24 @@
|
||||
<!-- AuthCode input -->
|
||||
<div class="form-outline mb-4">
|
||||
<input id="track-authcode" v-model="data.userData.authcode" class="form-control bg-secondary"
|
||||
placeholder="AuthCode*"
|
||||
placeholder="AuthCode (required)"
|
||||
required type="text"/>
|
||||
</div>
|
||||
|
||||
<!-- ShareCode input -->
|
||||
<div class="form-outline mb-2">
|
||||
<input id="track-sharecode" v-model="data.userData.sharecode" class="form-control bg-secondary"
|
||||
placeholder="ShareCode"
|
||||
placeholder="ShareCode (optional)"
|
||||
type="text"/>
|
||||
</div>
|
||||
|
||||
<div class="form-outline mb-4">
|
||||
<small>You can find your AuthCode and ShareCode <a
|
||||
href="https://help.steampowered.com/en/wizard/HelpWithGameIssue/?appid=730&issueid=128"
|
||||
target="_blank">here</a>.</small>
|
||||
<small>
|
||||
<a href="https://help.steampowered.com/en/wizard/HelpWithGameIssue/?appid=730&issueid=128"
|
||||
target="_blank">
|
||||
Here you can find your AuthCode and ShareCode
|
||||
</a>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- Submit button -->
|
||||
@@ -148,7 +151,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {onBeforeMount, onBeforeUnmount, onMounted, reactive, watch} from "vue";
|
||||
import {onBeforeMount, onBeforeUnmount, onMounted, reactive, ref, watch} from "vue";
|
||||
import {useStore} from "vuex";
|
||||
import {
|
||||
constructAvatarUrl,
|
||||
@@ -180,7 +183,7 @@ export default {
|
||||
setup(props) {
|
||||
// Variables
|
||||
const store = useStore()
|
||||
|
||||
const pHeight = ref(0)
|
||||
const displayCounter = 3
|
||||
|
||||
const data = reactive({
|
||||
@@ -201,6 +204,16 @@ export default {
|
||||
playerMeta: {},
|
||||
})
|
||||
|
||||
const getWindowHeight = () => {
|
||||
const navHeight = document.getElementsByTagName('nav')[0].clientHeight
|
||||
const footerHeight = document.getElementsByTagName('footer')[0].clientHeight
|
||||
|
||||
// 70 = nav-height | 108.5 = footer-height
|
||||
return window.innerHeight - navHeight - footerHeight
|
||||
}
|
||||
|
||||
pHeight.value = getWindowHeight()
|
||||
|
||||
onBeforeMount(() => {
|
||||
if (Object.entries(store.state.playerDetails).length === 0) {
|
||||
GetPlayer()
|
||||
@@ -352,9 +365,14 @@ export default {
|
||||
})
|
||||
})
|
||||
|
||||
window.onresize = () => {
|
||||
pHeight.value = getWindowHeight()
|
||||
}
|
||||
|
||||
return {
|
||||
data,
|
||||
store,
|
||||
pHeight,
|
||||
props,
|
||||
TrackPlayer,
|
||||
RefreshData,
|
||||
|
Reference in New Issue
Block a user