4 Commits
1.0 ... 1.0.3

Author SHA1 Message Date
vikingowl
0e29652651 1.0.3 (#52)
All checks were successful
CSGOWTF/csgowtf/pipeline/head This commit looks good
Co-authored-by: vikingowl <cw.nachtigall@gmail.com>
Reviewed-on: https://git.harting.dev/CSGOWTF/csgowtf/pulls/52
Co-authored-by: vikingowl <vikingowl@git.harting.dev>
Co-committed-by: vikingowl <vikingowl@git.harting.dev>
2022-01-31 22:58:23 +01:00
vikingowl
4464d92e81 1.0.2 (#47)
All checks were successful
CSGOWTF/csgowtf/pipeline/head This commit looks good
Co-authored-by: vikingowl <cw.nachtigall@gmail.com>
Reviewed-on: https://git.harting.dev/CSGOWTF/csgowtf/pulls/47
Co-authored-by: vikingowl <vikingowl@git.harting.dev>
Co-committed-by: vikingowl <vikingowl@git.harting.dev>
2022-01-31 19:06:47 +01:00
vikingowl
1c178404ab fixed background on player (#42)
All checks were successful
CSGOWTF/csgowtf/pipeline/head This commit looks good
Co-authored-by: vikingowl <cw.nachtigall@gmail.com>
Reviewed-on: https://git.harting.dev/CSGOWTF/csgowtf/pulls/42
Co-authored-by: vikingowl <vikingowl@git.harting.dev>
Co-committed-by: vikingowl <vikingowl@git.harting.dev>
2022-01-31 03:05:29 +01:00
f2a8e483c4 added link preload
All checks were successful
CSGOWTF/csgowtf/pipeline/head This commit looks good
2022-01-31 02:09:45 +01:00
4 changed files with 86 additions and 62 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "csgowtf", "name": "csgowtf",
"version": "1.0.0", "version": "1.0.3",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",

View File

@@ -1,58 +1,63 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta content="width=device-width,initial-scale=1.0" name="viewport">
<meta name="description" <meta content="Track your CSGO matches and see your match details."
content="Open source CSGO data platform"> name="description">
<meta name="robots" <meta content="index, follow, archive"
content="index, follow, archive"> name="robots">
<meta property="st:section" <meta content="Track your CSGO matches and see your match details."
content="Open source CSGO data platform"> property="st:section">
<meta name="twitter:title" <meta content="csgoWTF - Open source CSGO data platform"
content="csgoWTF"> name="twitter:title">
<meta name="twitter:description" <meta content="Track your CSGO matches and see your match details."
content="Open source CSGO data platform"> name="twitter:description">
<meta name="twitter:card" <meta content="summary_large_image"
content="summary_large_image"> name="twitter:card">
<meta property="og:url" <meta content="https://csgow.tf/"
content="https://csgow.tf/"> property="og:url">
<meta property="og:title" <meta content="csgoWTF - Open source CSGO data platform"
content="csgoWTF"> property="og:title">
<meta property="og:description" <meta content="Track your CSGO matches and see your match details."
content="Open source CSGO data platform"> property="og:description">
<meta property="og:type" <meta content="website"
content="website"> property="og:type">
<meta property="og:locale" <meta content="en_US"
content="en_US"> property="og:locale">
<meta property="og:site_name" <meta content="csgoWTF - Open source CSGO data platform"
content="csgoWTF"> property="og:site_name">
<meta name="twitter:image" <meta content="https://csgow.tf/android-chrome-512x512.png"
content="https://csgow.tf/logo.svg"> name="twitter:image">
<meta property="og:image" <meta content="https://csgow.tf/android-chrome-512x512.png"
content="https://csgow.tf/logo.svg"> property="og:image">
<meta property="og:image:width" <meta content="512"
content="1024"> property="og:image:width">
<meta property="og:image:height" <meta content="512"
content="1024"> property="og:image:height">
<meta property="og:image:secure_url" <meta content="https://csgow.tf/android-chrome-512x512.png"
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 href="<%= BASE_URL %>apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180">
<link rel="icon" type="image/png" sizes="32x32" href="<%= BASE_URL %>favicon-32x32.png"> <link href="<%= BASE_URL %>favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
<link rel="icon" type="image/png" sizes="16x16" href="<%= BASE_URL %>favicon-16x16.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> <title><%= htmlWebpackPlugin.options.title %></title>
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
</noscript> Please enable it to continue.</strong>
<div id="app" class="d-flex flex-column min-vh-100"></div> </noscript>
<!-- built files will be auto injected --> <div id="app" class="d-flex flex-column min-vh-100"></div>
</body> <!-- built files will be auto injected -->
</body>
</html> </html>

View File

@@ -215,8 +215,8 @@ export default {
data.stats = data.matchDetails.stats data.stats = data.matchDetails.stats
data.score = data.matchDetails.score data.score = data.matchDetails.score
data.team1Avg = getTeamAvgRank(1).reduce((a, b) => a + b) / 5 data.team1Avg = Math.floor(getTeamAvgRank(1).reduce((a, b) => a + b) / 5)
data.team2Avg = getTeamAvgRank(2).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') LoadImage(data.matchDetails.map ? data.matchDetails.map : 'random')
@@ -271,7 +271,7 @@ export default {
const getTeamAvgRank = (team) => { const getTeamAvgRank = (team) => {
let arr = [] let arr = []
for (let i = (team - 1) * 5; i < team * 5; i++) { 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 return arr
} }

View File

@@ -1,7 +1,7 @@
<template> <template>
<img alt="" class="bg-img" src=""> <img alt="" class="bg-img" src="">
<div class="wrapper"> <div class="wrapper" :style="{minHeight: pHeight + 'px'}">
<div class="container-lg"> <div class="container-lg">
<div v-if="store.state.playerDetails.name"> <div v-if="store.state.playerDetails.name">
<div class="card mb-3 bg-transparent border-0"> <div class="card mb-3 bg-transparent border-0">
@@ -85,21 +85,25 @@
<!-- AuthCode input --> <!-- AuthCode input -->
<div class="form-outline mb-4"> <div class="form-outline mb-4">
<input id="track-authcode" v-model="data.userData.authcode" class="form-control bg-secondary" <input id="track-authcode" v-model="data.userData.authcode" class="form-control bg-secondary"
placeholder="AuthCode*" placeholder="AuthCode (required)"
required type="text"/> required type="text"/>
</div> </div>
<!-- ShareCode input --> <!-- ShareCode input -->
<div class="form-outline mb-2"> <div class="form-outline mb-2">
<input id="track-sharecode" v-model="data.userData.sharecode" class="form-control bg-secondary" <input id="track-sharecode" v-model="data.userData.sharecode" class="form-control bg-secondary"
placeholder="ShareCode" :placeholder="store.state.playerDetails.matches ? 'ShareCode (optional)' : 'ShareCode (required)'"
:required="!store.state.playerDetails.matches"
type="text"/> type="text"/>
</div> </div>
<div class="form-outline mb-4"> <div class="form-outline mb-4">
<small>You can find your AuthCode and ShareCode <a <small>
href="https://help.steampowered.com/en/wizard/HelpWithGameIssue/?appid=730&issueid=128" <a href="https://help.steampowered.com/en/wizard/HelpWithGameIssue/?appid=730&issueid=128"
target="_blank">here</a>.</small> target="_blank">
Here you can find your AuthCode and ShareCode
</a>
</small>
</div> </div>
<!-- Submit button --> <!-- Submit button -->
@@ -120,7 +124,7 @@
<div class="matches"> <div class="matches">
<MatchesTable v-if="store.state.playerDetails.matches" :matches="store.state.playerDetails.matches" color-front /> <MatchesTable v-if="store.state.playerDetails.matches" :matches="store.state.playerDetails.matches" color-front />
<h5 v-else>No matches on record</h5> <h5 v-else>Track yourself to see your matches</h5>
</div> </div>
@@ -148,7 +152,7 @@
</template> </template>
<script> <script>
import {onBeforeMount, onBeforeUnmount, onMounted, reactive, watch} from "vue"; import {onBeforeMount, onBeforeUnmount, onMounted, reactive, ref, watch} from "vue";
import {useStore} from "vuex"; import {useStore} from "vuex";
import { import {
constructAvatarUrl, constructAvatarUrl,
@@ -180,7 +184,7 @@ export default {
setup(props) { setup(props) {
// Variables // Variables
const store = useStore() const store = useStore()
const pHeight = ref(0)
const displayCounter = 3 const displayCounter = 3
const data = reactive({ const data = reactive({
@@ -201,6 +205,16 @@ export default {
playerMeta: {}, 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(() => { onBeforeMount(() => {
if (Object.entries(store.state.playerDetails).length === 0) { if (Object.entries(store.state.playerDetails).length === 0) {
GetPlayer() GetPlayer()
@@ -352,9 +366,14 @@ export default {
}) })
}) })
window.onresize = () => {
pHeight.value = getWindowHeight()
}
return { return {
data, data,
store, store,
pHeight,
props, props,
TrackPlayer, TrackPlayer,
RefreshData, RefreshData,