From 7e65c8d6ceb34fb9e128242d677552313d90d38e Mon Sep 17 00:00:00 2001 From: gsd Date: Tue, 16 Jul 2024 19:11:19 +0300 Subject: [PATCH] hype features --- src/api/GlobalApi.js | 1 + .../Tables/KillAssistDeadDialog.vue | 4 +++- .../Components/ProfileContainer.vue | 22 +++++++++++++------ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/api/GlobalApi.js b/src/api/GlobalApi.js index c21571c..b4720b6 100644 --- a/src/api/GlobalApi.js +++ b/src/api/GlobalApi.js @@ -72,6 +72,7 @@ export default class GlobalApi { } getHumanServerName(server) { + this.create_server_websocket(); for (const srv in this.stats.servers_map) { if (this.stats.servers_map[srv]['key'] === server) return this.stats.servers_map[srv]['name']; } diff --git a/src/components/ActionDialogs/Tables/KillAssistDeadDialog.vue b/src/components/ActionDialogs/Tables/KillAssistDeadDialog.vue index 36d2302..97014a4 100644 --- a/src/components/ActionDialogs/Tables/KillAssistDeadDialog.vue +++ b/src/components/ActionDialogs/Tables/KillAssistDeadDialog.vue @@ -33,6 +33,7 @@ Искать + Текущая сессия Любимые оружия Закрыть @@ -67,6 +68,7 @@ export default { srv: null, srv_setted: false, type: 0, + currentSes:false, mykills: { mdCount: 1, mdPage: 1, @@ -95,7 +97,7 @@ export default { case 1: {method = "delete"; break;} case 2: {method = "put"; break;} } - axios[method](`api/profile/killfeed?${this.steam64 === null?'':`steam64=${this.steam64}&`}${this.srv===null?'':`srv=${this.srv}&`}limit=${Math.abs(limit)}&offset=${offset}` + Random.getRndWebAppend()).then( + axios[method](`api/profile/killfeed?${this.steam64 === null?'':`steam64=${this.steam64}&`}${this.srv===null?'':`srv=${this.srv}&`}limit=${Math.abs(limit)}&offset=${offset}¤t=${this.currentSes}` + Random.getRndWebAppend()).then( (response) => { if (response.status === 200) { this.mykills.mdData = response.data['result']; diff --git a/src/components/TabsMenuElements/ProfileView/Components/ProfileContainer.vue b/src/components/TabsMenuElements/ProfileView/Components/ProfileContainer.vue index 757a84f..fa7d7b1 100644 --- a/src/components/TabsMenuElements/ProfileView/Components/ProfileContainer.vue +++ b/src/components/TabsMenuElements/ProfileView/Components/ProfileContainer.vue @@ -88,10 +88,10 @@

IP : {{player_ip}}

Страна : {{this.player['play_on']['country']}}

К\Д : {{this.killfeed.loading?'Загрузка...':this.killfeed.loaded?Math.round(this.killfeed.store['kills'] / this.killfeed.store['deads']):"Показать"}}

-

Убийств : {{this.killfeed.store['kills']}}

-

Помощи : {{this.killfeed.store['assists']}}

-

Смертей : {{this.killfeed.store['deads']}}

-

Суицидов : {{this.killfeed.store['suicides']}}

+

Убийств : {{this.killfeed.store['kills']}}{{this.killfeed_current.store!=null?'/'+this.killfeed_current.store['kills']:''}}

+

Помощи : {{this.killfeed.store['assists']}}{{this.killfeed_current.store!=null?'/'+this.killfeed_current.store['assists']:''}}

+

Смертей : {{this.killfeed.store['deads']}}{{this.killfeed_current.store!=null?'/'+this.killfeed_current.store['deads']:''}}

+

Суицидов : {{this.killfeed.store['suicides']}}{{this.killfeed_current.store!=null?'/'+this.killfeed_current.store['suicides']:''}}

Сообщений : {{this.player['messages']}}

@@ -160,6 +160,11 @@ export default { loading: false, loaded: false, store:null + }, + killfeed_current: { + loading: false, + loaded: false, + store:null } }), methods: { @@ -246,15 +251,18 @@ export default { .finally(() => this.altaccount.loading = false) }, loadKillFeed(){ - if (this.killfeed.store == null && this.killfeed.loading === false) { + if (this.killfeed.loading === false) { this.killfeed.loading = true; + this.killfeed_current.loading = true; axios.get(`api/profile/web?steam64=${this.player['steamids']['steam64']}&requests=killfeed` + Random.getRndWebAppend()) .then(response => { this.killfeed.store = response.data['killfeed']; + this.killfeed_current.store = response.data["killfeed_current"]; this.killfeed.loaded = true; + this.killfeed_current.loaded = true; }) - .catch(() => this.killfeed.loaded = false) - .finally(() => this.killfeed.loading = false) + .catch(() => {this.killfeed.loaded = false;this.killfeed_current.loaded=false;}) + .finally(() => {this.killfeed.loading = false;this.killfeed_current.loading=false;}) } } }