From f366e27795849e786abde1086acd3966aa3e9eac Mon Sep 17 00:00:00 2001 From: Zemill <33404722+Zemill@users.noreply.github.com> Date: Sat, 25 May 2024 07:51:23 -0400 Subject: [PATCH] Fixes leaderboard rank filtering display of rank --- .../Global/Leaderboard/GlobalLeaderboard.vue | 37 ++++++++++++++----- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/resources/js/components/Global/Leaderboard/GlobalLeaderboard.vue b/resources/js/components/Global/Leaderboard/GlobalLeaderboard.vue index 9c62a162..5f78cd13 100644 --- a/resources/js/components/Global/Leaderboard/GlobalLeaderboard.vue +++ b/resources/js/components/Global/Leaderboard/GlobalLeaderboard.vue @@ -93,27 +93,27 @@ - Rank + {{ getHeaderRankText("rank") }} - + Battletag - + Region - + Win Rate % - + Heroes Profile Rating - + {{ leaderboardtype }} MMR - + Tier - + Games Played @@ -143,7 +143,7 @@ - {{ row.rank }} +
{{ index+1 }}{{ 500-index }}
{{ row.rank }}
@@ -272,11 +272,19 @@ export default { ratingLoading: false, playerRatingGamesPlayed: null, tierrank: null, + rankchange: false, + isfiltered: false, } }, created(){ this.gametype = this.gametypedefault[0]; this.season = this.defaultseason; + + if(this.region != null || this.tierrank != null){ + this.rankchange = true; + this.isfiltered = true; + } + this.getData(); }, mounted() { @@ -389,6 +397,11 @@ export default { } else { this.sortDir = 'desc'; } + + this.rankchange = true; + if((key == 'rank' || key == 'rating') && !this.isfiltered){ + this.rankchange = false; + } this.sortKey = key; }, getCopyBuildToGame(level_one, level_four, level_seven, level_ten, level_thirteen, level_sixteen, level_twenty, hero) { @@ -452,6 +465,12 @@ export default { } } + }, + getHeaderRankText(){ + if(this.rankchange){ + return "Sorted Rank|(Rank)"; + } + return "Rank" } } }