diff --git a/src/components/PlayerSideInfo.vue b/src/components/PlayerSideInfo.vue index 407c554..2666e89 100644 --- a/src/components/PlayerSideInfo.vue +++ b/src/components/PlayerSideInfo.vue @@ -20,15 +20,13 @@ -
+
Most played with

@@ -52,24 +50,12 @@
-
+
Best Mate (by winrate)

-
- -
-
-
Best Mate (by winrate)
-
-
-
@@ -94,15 +80,13 @@ {{ setDmgGraphWidth() }}
-
+
Weapons (by dmg)

@@ -126,24 +110,12 @@
-
+
Best Map (by winrate)

-
- -
-
-
Best Map (by winrate)
-
-
-
@@ -166,6 +138,11 @@ export default { setup(props) { const displayCounter = 3 + const mostMatesLoading = ref(true) + const bestMatesLoading = ref(true) + const weaponsLoading = ref(true) + const mapsLoading = ref(true) + const data = reactive({ best_maps: [], best_weapons_tmp: [], @@ -223,9 +200,22 @@ export default { if (data.best_maps.length > displayCounter) data.best_maps.splice(displayCounter, data.best_maps.length - displayCounter) + + if (!props.player_meta.most_mates) { + mostMatesLoading.value = false + } + if (!props.player_meta.best_mates) { + bestMatesLoading.value = false + } + if (!props.player_meta.win_maps) { + mapsLoading.value = false + } + if (!props.player_meta.eq_map || !props.player_meta.weapon_dmg) { + weaponsLoading.value = false + } }) - return {props, data, setDmgGraphWidth, GoToPlayer, constructAvatarUrl, FixMapName} + return {props, data, weaponsLoading, mapsLoading, mostMatesLoading, bestMatesLoading, setDmgGraphWidth, GoToPlayer, constructAvatarUrl, FixMapName} } } diff --git a/src/utils/ApiRequests.js b/src/utils/ApiRequests.js index 027f8f5..da36181 100644 --- a/src/utils/ApiRequests.js +++ b/src/utils/ApiRequests.js @@ -56,6 +56,8 @@ export const TrackMe = async (id64, authcode, sharecode = '') => { // const res = await axios // .post(`${API_URL}/player/${id64}/track`, `authcode=${authcode}&sharecode=${sharecode}`) + // TODO: Needs testing + const res = await axios({ method: 'post', url: `${API_URL}/player/${id64}/track`, diff --git a/src/views/Player.vue b/src/views/Player.vue index 8a0930f..93331a7 100644 --- a/src/views/Player.vue +++ b/src/views/Player.vue @@ -268,8 +268,6 @@ export default { } await SetPlayerData() - - console.log(store.state.playerDetails) } } } @@ -327,7 +325,7 @@ export default { }) watch(() => data.playerMeta, () => { - + console.log(data.playerMeta) }) onMounted(async () => { @@ -339,6 +337,8 @@ export default { data.playerMeta = await GetPlayerMeta(props.id, displayCounter) scrollToPos(store.state.scroll_state) + + console.log(store.state.playerDetails) }) onBeforeUnmount(() => {