Compare commits

..

5 Commits

4 changed files with 26 additions and 6 deletions

View File

@ -69,10 +69,10 @@ campaignPlayer.route('/ranking/:campaignId')
resItem.respawn += player.respawn;
resItem.flagTouch += player.flagTouch;
if (player.travelDistance) {
resItem.travelDistance += Math.round(player.travelDistance / 1000);
resItem.travelDistance += Math.round(player.travelDistance / 1000); // meters -> km
}
if (player.driverDistance) {
resItem.driverDistance += Math.round(player.driverDistance / 1000);
resItem.driverDistance += Math.round(player.driverDistance / 1000); // meters -> km
}
}
resItem.warCount = playerInstances.length;
@ -82,12 +82,12 @@ campaignPlayer.route('/ranking/:campaignId')
const getSortedField = (fieldName) => {
let num = 1;
const filteredSortResult = rankingItems.map(item => {
const filteredSortResult = rankingItems.map((item) => {
return {
name: item.name,
fraction: item.fraction,
[fieldName]: item[fieldName]
}
[fieldName]: item[fieldName],
};
})
.sort((a, b) => b[fieldName] - a[fieldName]);
const res = JSON.parse(JSON.stringify(filteredSortResult));

View File

@ -3,6 +3,11 @@
border-right: 1px solid #dadada;
}
.war-item:hover, .selected{
background: linear-gradient(80deg, white 0%, #e7e7e7 120%);
border-bottom: 1px solid #dadada;
}
.war-item-box {
padding-top: 15px;
}

View File

@ -9,6 +9,21 @@
cursor: pointer;
}
.list-header:hover, .selected{
background: linear-gradient(80deg, white 0%, #e7e7e7 120%);
}
.list-header-battles {
border-bottom: 1px solid #dadada;
border-right: 1px solid #dadada;
border-left: 4px solid transparent;
padding: 25px;
font-size: 16px;
text-transform: uppercase;
color: #333333;
border-bottom: 1px solid #f1f1f1;
}
.mat-icon {
color: #666666;
vertical-align: middle;

View File

@ -29,7 +29,7 @@
<span *ngIf="!collapsed">{{'stats.sidebar.highscore' | translate}}</span>
</div>
<div class="list-header" style="cursor: default; border-bottom: 1px solid #f1f1f1;">
<div class="list-header-battles">
<mat-icon [matTooltip]="collapsed ? toolTipTranslation['stats.sidebar.battles'] : ''"
matTooltipPosition="right"
svgIcon="battle"></mat-icon>