Simplify highscore code and adjust font in table head
parent
e54168ec22
commit
d6703f715d
|
@ -60,7 +60,7 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
|||
this.campaignPlayer = campaignPlayer;
|
||||
|
||||
this.graphData = [
|
||||
{ key: 'kill', label: 'Kills', },
|
||||
{ key: 'kill', label: 'Abschüsse', },
|
||||
{ key: 'friendlyFire', label: 'Friendly Fire', },
|
||||
{ key: 'death', label: 'Tode', },
|
||||
{ key: 'respawn', label: 'Respawn', },
|
||||
|
|
|
@ -57,6 +57,10 @@ ngx-datatable {
|
|||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
:host /deep/ .ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/* Table Scrollbar BEGIN */
|
||||
|
||||
:host /deep/ .ngx-datatable.scroll-vertical .datatable-body::-webkit-scrollbar {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div *ngFor="let attributeMap of playerAttributeDisplayNames.slice(2, playerAttributeDisplayNames.length)">
|
||||
<div *ngFor="let attributeMap of playerAttributeDisplayNames">
|
||||
<ngx-datatable
|
||||
[rows]="players[attributeMap.prop]"
|
||||
[messages]="emptyMessage"
|
||||
|
|
|
@ -28,7 +28,7 @@ export class StatisticHighScoreComponent implements OnInit {
|
|||
|
||||
playersStored = {};
|
||||
|
||||
playerAttributeDisplayNames = PlayerUtils.attributeDisplayNames;
|
||||
playerAttributeDisplayNames = PlayerUtils.attributeDisplayNames.slice(2, PlayerUtils.attributeDisplayNames.length);
|
||||
|
||||
cellHeight = 40;
|
||||
|
||||
|
@ -36,7 +36,7 @@ export class StatisticHighScoreComponent implements OnInit {
|
|||
|
||||
nameColWidth = 210;
|
||||
|
||||
valueColWidth = 50;
|
||||
valueColWidth = 55;
|
||||
|
||||
emptyMessage = {emptyMessage: 'Keine Einträge'};
|
||||
|
||||
|
@ -87,17 +87,11 @@ export class StatisticHighScoreComponent implements OnInit {
|
|||
if (!this.searchTerm.value || this.searchTerm.value === '') {
|
||||
this.players = this.playersStored;
|
||||
} else {
|
||||
this.players = {
|
||||
kill: this.filterPlayerAttribute('kill'),
|
||||
friendlyFire: this.filterPlayerAttribute('friendlyFire'),
|
||||
vehicleLight: this.filterPlayerAttribute('vehicleLight'),
|
||||
vehicleHeavy: this.filterPlayerAttribute('vehicleLight'),
|
||||
vehicleAir: this.filterPlayerAttribute('vehicleLight'),
|
||||
death: this.filterPlayerAttribute('death'),
|
||||
respawn: this.filterPlayerAttribute('respawn'),
|
||||
revive: this.filterPlayerAttribute('revive'),
|
||||
flagTouch: this.filterPlayerAttribute('flagTouch')
|
||||
};
|
||||
this.players = {};
|
||||
for (let i = 0; i < this.playerAttributeDisplayNames.length; i++) {
|
||||
const attributeProperty = this.playerAttributeDisplayNames[i].prop;
|
||||
this.players[attributeProperty] = this.filterPlayerAttribute(attributeProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,10 @@ ngx-datatable {
|
|||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
:host /deep/ .ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/* Table Scrollbar BEGIN */
|
||||
:host /deep/ .ngx-datatable.scroll-vertical .datatable-body::-webkit-scrollbar {
|
||||
width: 12px;
|
||||
|
|
Loading…
Reference in New Issue