From 45ab9887cf2425f39d798e1a70d69dc07832ce11 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Thu, 3 Feb 2022 16:37:42 +0100 Subject: [PATCH] added tick_rate + condition to display chat --- src/components/MatchChatHistory.vue | 12 +++++++----- src/views/Match.vue | 10 +++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/components/MatchChatHistory.vue b/src/components/MatchChatHistory.vue index dc9f280..ec37f3c 100644 --- a/src/components/MatchChatHistory.vue +++ b/src/components/MatchChatHistory.vue @@ -1,10 +1,10 @@ @@ -60,9 +63,8 @@ export default { const getChatHistory = async () => { const resData = await GetChatHistory(store, store.state.matchDetails.match_id) - if (resData !== null) { + if (resData !== null) data.chat = await setPlayer(sortChatHistory(resData)) - } } const sortChatHistory = (res = {}) => { @@ -85,7 +87,6 @@ export default { } const setPlayer = async (chat) => { - console.log(store.state.matchDetails) let arr = [] for (const o of chat) { for (const p of store.state.matchDetails.stats) { @@ -102,6 +103,7 @@ export default { game_ban: p.player.game_ban, game_ban_date: p.player.game_ban_date, tick: o.tick, + tick_rate: store.state.matchDetails.tick_rate !== -1 ? store.state.matchDetails.tick_rate : 64, all_chat: o.all_chat, message: o.message }) diff --git a/src/views/Match.vue b/src/views/Match.vue index af42733..96a5797 100644 --- a/src/views/Match.vue +++ b/src/views/Match.vue @@ -129,9 +129,9 @@ replace>Damage -