From 7867c1d48098eb044672d7e5ef19ffc8096dbaf3 Mon Sep 17 00:00:00 2001 From: HardiReady Date: Sat, 3 Mar 2018 13:49:25 +0100 Subject: [PATCH] Add vehicle kill count to highscore page --- api/routes/players.js | 3 + .../highscore/highscore.component.css | 2 - .../highscore/highscore.component.html | 63 ++++++++++++------- .../highscore/highscore.component.ts | 1 + 4 files changed, 46 insertions(+), 23 deletions(-) diff --git a/api/routes/players.js b/api/routes/players.js index 731bda1..dd0d962 100644 --- a/api/routes/players.js +++ b/api/routes/players.js @@ -38,6 +38,7 @@ campaignPlayer.route('/ranking/:campaignId') const resItem = { name: playerName, kill: 0, + vehicle: 0, death: 0, friendlyFire: 0, revive: 0, @@ -48,6 +49,7 @@ campaignPlayer.route('/ranking/:campaignId') resItem.kill += playerInstances[i].kill; resItem.death += playerInstances[i].death; resItem.friendlyFire += playerInstances[i].friendlyFire; + resItem.vehicle += playerInstances[i].vehicle; resItem.revive += playerInstances[i].revive; resItem.respawn += playerInstances[i].respawn; resItem.flagTouch += playerInstances[i].flagTouch; @@ -70,6 +72,7 @@ campaignPlayer.route('/ranking/:campaignId') kill: getSortedField('kill'), death: getSortedField('death'), friendlyFire: getSortedField('friendlyFire'), + vehicle: getSortedField('vehicle'), revive: getSortedField('revive'), respawn: getSortedField('respawn'), flagTouch: getSortedField('flagTouch') diff --git a/static/src/app/statistic/highscore/highscore.component.css b/static/src/app/statistic/highscore/highscore.component.css index b5aa737..50ecc49 100644 --- a/static/src/app/statistic/highscore/highscore.component.css +++ b/static/src/app/statistic/highscore/highscore.component.css @@ -18,8 +18,6 @@ ngx-datatable { float: left; border: solid #dfdfdf 1px; border-radius: 10px 10px 2px 2px; - border-right-style: none; - border-top-style: none; } :host /deep/ .datatable-header { diff --git a/static/src/app/statistic/highscore/highscore.component.html b/static/src/app/statistic/highscore/highscore.component.html index 1e4297d..7bb51f6 100644 --- a/static/src/app/statistic/highscore/highscore.component.html +++ b/static/src/app/statistic/highscore/highscore.component.html @@ -36,6 +36,48 @@ + + + + + + {{value}} + + + + + + + + + + + + {{value}} + + + + + + - - - - - - {{value}} - - - - - -