+
+
+ CSGOWTF
Explore
-
@@ -68,6 +68,8 @@ export default {
router.push(`/player/${store.state.vanityUrl}`)
}
}
+
+ document.activeElement.blur()
}
return {
@@ -79,6 +81,7 @@ export default {
\ No newline at end of file
diff --git a/src/components/ScoreTeam.vue b/src/components/ScoreTeam.vue
index 3cea037..92d4eb2 100644
--- a/src/components/ScoreTeam.vue
+++ b/src/components/ScoreTeam.vue
@@ -1,45 +1,49 @@
-
-
-
- |
- |
- |
- K |
- A |
- D |
- +/- |
- K/D |
- ADR |
- HS% |
-
- KAST
- |
- Rating |
-
-
-
-
-
-
-
-
+
+
+ {{props.score}}
+
+
+ |
+ |
+ |
+ K |
+ A |
+ D |
+ +/- |
+ K/D |
+ ADR |
+ HS% |
+ Rating |
+ MVP |
+ Score |
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/src/components/ScoreTeamPlayer.vue b/src/components/ScoreTeamPlayer.vue
index dc75225..9489b8a 100644
--- a/src/components/ScoreTeamPlayer.vue
+++ b/src/components/ScoreTeamPlayer.vue
@@ -19,7 +19,7 @@
{{ props.deaths }}
|
-
+ |
{{ props.kdiff }}
|
@@ -31,14 +31,17 @@
|
{{ (props.hs > 0 && props.kills > 0) ? (props.hs * 100 / props.kills).toFixed(0) + "%" : "0%" }}
|
-
- {{ props.kast ? props.kast + "%" : "-" }}
- |
{{
GetHLTV_1(props.kills, props.rounds_played, props.deaths, props.mk_duo, props.mk_triple, props.mk_quad, props.mk_pent)
}}
|
+
+ {{props.mvp}}
+ |
+
+ {{props.player_score}}
+ |
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 890fa23..75570a4 100644
--- a/src/main.js
+++ b/src/main.js
@@ -5,4 +5,4 @@ import store from './store'
import 'bootstrap'
import '../scss/custom.scss'
-createApp(App).use(store).use(router).mount('#app')
+createApp(App).use(store).use(router).mount('#app')
\ No newline at end of file
diff --git a/src/utils/index.js b/src/utils/index.js
index e3f2141..5e9c25e 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -1,16 +1,22 @@
-import {DateTime} from "luxon/build/es6/luxon";
-import router from '@/router'
+import {DateTime, Duration} from "luxon/build/es6/luxon";
+import router from '../router'
export const FormatDuration = (d) => {
- const hours = Math.floor(d / 3600)
- const num = d % 3600
- const minutes = Math.floor(num % 3600 / 60)
- const seconds = Math.floor(num % 3600 % 60)
+ const duration = Duration.fromObject({hours: 0, minutes: 0, seconds: d}).normalize().toObject()
- if (hours !== 0)
- return `${hours}:${minutes < 10 ? '0' + minutes : minutes}:${seconds < 10 ? '0' + seconds : seconds}`
- else
- return `${minutes < 10 ? '0' + minutes : minutes}:${seconds < 10 ? '0' + seconds : seconds}`
+ if (duration.hours > 1)
+ return `${duration.hours} h ${duration.minutes} min`
+ else if (duration.hours < 1)
+ return `${duration.minutes} min`
+}
+
+export const FormatFullDuration = (d) => {
+ const duration = Duration.fromObject({hours: 0, minutes: 0, seconds: d}).normalize()
+
+ if (duration.hours > 1)
+ return duration.toFormat('hh:mm:ss')
+ else if (duration.hours < 1)
+ return duration.toFormat('mm:ss')
}
export const FormatDate = (date) => {
@@ -18,7 +24,7 @@ export const FormatDate = (date) => {
const diff = DateTime.now().diff(matchDate)
if (diff.as('days') > 10)
- return matchDate.toLocaleString({weekday: 'short', day: 'numeric', month: 'numeric', year: 'numeric'})
+ return matchDate.toLocaleString({weekday: 'short', day: '2-digit', month: '2-digit', year: 'numeric'})
else if (diff.as('days') < 1)
if (diff.as('hours') < 1)
return Math.floor(diff.as('minutes')) + ' minutes ago'
@@ -28,6 +34,20 @@ export const FormatDate = (date) => {
return Math.floor(diff.as('days')) + ' days ago'
}
+export const FormatFullDate = (date) => {
+ const matchDate = DateTime.fromISO(date)
+
+ return matchDate.toLocaleString({
+ weekday: 'short',
+ day: '2-digit',
+ month: '2-digit',
+ year: 'numeric',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit'
+ })
+}
+
export const GoToMatch = (id) => {
router.push(`/match/${id}`)
}
@@ -47,4 +67,17 @@ export const GetHLTV_1 = (kills = 0, rounds, deaths = 0, k2 = 0, k3 = 0, k4 = 0,
const RoundsWithMultipleKillsRating = (k1 + 4 * k2 + 9 * k3 + 16 * k4 + 25 * k5) / rounds / Weight_RMK
return ((KillRating + 0.7 * SurvivalRating + RoundsWithMultipleKillsRating) / 2.7).toFixed(2)
+}
+
+export const SaveLastVisitedToLocalStorage = (data) => {
+ let a = JSON.parse(localStorage.getItem('recent-visited')) || [];
+ if (a.length === 0) {
+ a.push(data);
+ } else if (a.find(p => p.steamid64 === data.steamid64)) {
+ a.splice(a.findIndex(j => j.steamid64 === data.steamid64), 1)
+ a.push(data)
+ } else if (!a.find(p => p.steamid64 === data.steamid64)) {
+ a.push(data)
+ }
+ localStorage.setItem('recent-visited', JSON.stringify(a));
}
\ No newline at end of file
diff --git a/src/views/Explore.vue b/src/views/Explore.vue
index 55dd221..90fc223 100644
--- a/src/views/Explore.vue
+++ b/src/views/Explore.vue
@@ -1,9 +1,21 @@
- Explore
+
+
This site will be available soon
+
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/src/views/Home.vue b/src/views/Home.vue
index de28c8d..5695d90 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -1,62 +1,77 @@
-
-
CSGOWTF
-
Open source CSGO data platform
+
+
CSGOWTF
+ Open source CSGO data platform
-
-
-