diff --git a/api/routes/_generic.js b/api/routes/_generic.js index 6843bb1..7cd0cb7 100644 --- a/api/routes/_generic.js +++ b/api/routes/_generic.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; // HTTP status codes by name const codes = require('./http-codes'); diff --git a/static/src/app/statistic/campaign/highscore/highscore.component.html b/static/src/app/statistic/campaign/highscore/highscore.component.html index a62c187..e739427 100644 --- a/static/src/app/statistic/campaign/highscore/highscore.component.html +++ b/static/src/app/statistic/campaign/highscore/highscore.component.html @@ -15,194 +15,42 @@ - - - - +
+ + + + {{value}} - - - - + + - - - - - + + + + + {{attributeMap.head}} + + + + + {{value}} - - - - - - - - - - - {{value}} - - - - - - - - - - - - {{value}} - - - - - - - - - - - - {{value}} - - - - - - - - - - - - {{value}} - - - - - - - - - - - - {{value}} - - - - - - - - - - - - {{value}} - - - - - - - - - - - - {{value}} - - - - - + + + +
diff --git a/static/src/app/statistic/campaign/highscore/highscore.component.ts b/static/src/app/statistic/campaign/highscore/highscore.component.ts index 32a3d82..b8064d0 100644 --- a/static/src/app/statistic/campaign/highscore/highscore.component.ts +++ b/static/src/app/statistic/campaign/highscore/highscore.component.ts @@ -6,6 +6,7 @@ import {Fraction} from '../../../utils/fraction.enum'; import {FormControl} from '@angular/forms'; import {Observable} from 'rxjs/Observable'; import {Player} from '../../../models/model-interfaces'; +import {PlayerUtils} from "../../../utils/player-utils"; @Component({ @@ -27,13 +28,15 @@ export class StatisticHighScoreComponent implements OnInit { playersStored = {}; + playerAttributeDisplayNames = PlayerUtils.attributeDisplayNames; + cellHeight = 40; numberColWidth = 60; nameColWidth = 210; - valueColWidth = 110; + valueColWidth = 50; emptyMessage = {emptyMessage: 'Keine Einträge'}; diff --git a/static/src/app/statistic/war/fraction-stats/fraction-stats.component.ts b/static/src/app/statistic/war/fraction-stats/fraction-stats.component.ts index cfb8cf5..3aa902f 100644 --- a/static/src/app/statistic/war/fraction-stats/fraction-stats.component.ts +++ b/static/src/app/statistic/war/fraction-stats/fraction-stats.component.ts @@ -45,9 +45,9 @@ export class FractionStatsComponent implements OnInit, OnChanges { labelPoints = 'Punkte'; labelBudget = 'Budget'; - labelKill = 'Kills'; - labelFriendlyFire = 'FriendlyFire'; - labelVehicle = 'Fahrzeug-Kills'; + labelKill = 'Abschüsse'; + labelFriendlyFire = 'Friendly Fire'; + labelVehicle = 'Fahrzeug Abschüsse'; labelTransport = 'Lufttransport'; labelRevive = 'Revive'; labelStabilize = 'Stabilisiert'; diff --git a/static/src/app/statistic/war/scoreboard/scoreboard.component.ts b/static/src/app/statistic/war/scoreboard/scoreboard.component.ts index 972b02e..ac2b5b3 100644 --- a/static/src/app/statistic/war/scoreboard/scoreboard.component.ts +++ b/static/src/app/statistic/war/scoreboard/scoreboard.component.ts @@ -19,13 +19,7 @@ export class ScoreboardComponent implements OnChanges { @Output() playerTabSwitch = new EventEmitter(); - tableHead = [ - {prop: 'name', head: 'Spieler'}, {prop: 'fraction', head: 'Fraktion'}, {prop: 'kill', head: 'Abschüsse'}, - {prop: 'friendlyFire', head: 'Friendly Fire'}, {prop: 'vehicleLight', head: 'Fahrzeug (leicht)'}, - {prop: 'vehicleHeavy', head: 'Fahrzeug (schwer)'}, {prop: 'vehicleAir', head: 'Fahrzeug (Luft)'}, - {prop: 'revive', head: 'Revive'}, {prop: 'flagTouch', head: 'Eroberungen'}, {prop: 'death', head: 'Tode'}, - {prop: 'respawn', head: 'Respawn'} - ]; + tableHead = PlayerUtils.attributeDisplayNames; isSteamUUID = PlayerUtils.isSteamUUID; diff --git a/static/src/app/utils/player-utils.ts b/static/src/app/utils/player-utils.ts index 9a192df..7f530d7 100644 --- a/static/src/app/utils/player-utils.ts +++ b/static/src/app/utils/player-utils.ts @@ -1,5 +1,13 @@ export class PlayerUtils { + public static readonly attributeDisplayNames = [ + {prop: 'name', head: 'Spieler'}, {prop: 'fraction', head: 'Fraktion'}, {prop: 'kill', head: 'Abschüsse'}, + {prop: 'friendlyFire', head: 'Friendly Fire'}, {prop: 'vehicleLight', head: 'Fahrzeug (leicht)'}, + {prop: 'vehicleHeavy', head: 'Fahrzeug (schwer)'}, {prop: 'vehicleAir', head: 'Fahrzeug (Luft)'}, + {prop: 'revive', head: 'Revive'}, {prop: 'flagTouch', head: 'Eroberungen'}, {prop: 'death', head: 'Tode'}, + {prop: 'respawn', head: 'Respawn'} + ]; + public static isSteamUUID(input: string): boolean { const steamUIDPattern = new RegExp('[0-9]{17}'); return steamUIDPattern.test(input);