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

View File

@ -3,6 +3,11 @@
border-right: 1px solid #dadada; 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 { .war-item-box {
padding-top: 15px; padding-top: 15px;
} }

View File

@ -9,6 +9,21 @@
cursor: pointer; 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 { .mat-icon {
color: #666666; color: #666666;
vertical-align: middle; vertical-align: middle;

View File

@ -29,7 +29,7 @@
<span *ngIf="!collapsed">{{'stats.sidebar.highscore' | translate}}</span> <span *ngIf="!collapsed">{{'stats.sidebar.highscore' | translate}}</span>
</div> </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'] : ''" <mat-icon [matTooltip]="collapsed ? toolTipTranslation['stats.sidebar.battles'] : ''"
matTooltipPosition="right" matTooltipPosition="right"
svgIcon="battle"></mat-icon> svgIcon="battle"></mat-icon>