diff --git a/api/routes/wars.js b/api/routes/wars.js index 33ba5cc..a3000ad 100644 --- a/api/routes/wars.js +++ b/api/routes/wars.js @@ -149,7 +149,7 @@ wars.route('/:id') err.status = codes.notfound; return next(err); } - PlayerModel.find({warId: item._id}, {'_id': 0, 'warId': 0, '__v': 0, 'updatedAt': 0, 'timestamp': 0}, (err, items) => { + PlayerModel.find({warId: item._id}, {}, {sort: {kill: 'desc'}}, (err, items) => { if (err) { return next(err); } diff --git a/package.json b/package.json index ddc3151..e9f25d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opt-cc", - "version": "1.4.2", + "version": "1.4.3", "license": "MIT", "private": true, "scripts": { diff --git a/static/src/app/statistic/war-detail/war-detail.component.css b/static/src/app/statistic/war-detail/war-detail.component.css index b96dc82..d9a291c 100644 --- a/static/src/app/statistic/war-detail/war-detail.component.css +++ b/static/src/app/statistic/war-detail/war-detail.component.css @@ -10,31 +10,8 @@ height: 100vh; } -:host /deep/ mfDefaultSorter > a { - color: white; -} - -.table { - overflow-wrap: break-word; - table-layout: fixed; -} - -.scoreboard-table-container { - min-width: 920px; - max-width: 920px; -} - -.table-container { - overflow-x: auto; -} - -.table-head { - background: #222222; - color: white; -} - -.cell-outline { - outline: 1px solid #D4D4D4; +.player-name { + font-weight: bold; } .text-opfor { @@ -45,3 +22,37 @@ color: blue; } +/* ########### DATATABLE ########### */ + +:host /deep/ .datatable-header { + background: #222222; + font-weight: 700; + border-radius: 10px 10px 0 0; + color: white; +} + +:host /deep/ span.datatable-header-cell-label, :host /deep/ div.datatable-body-cell-label { + padding-left: 8px; +} + +:host /deep/ .ngx-datatable .datatable-header { + /*vertical center alignment*/ + display: table-cell; + vertical-align: middle; +} + +:host /deep/ .ngx-datatable .datatable-body .datatable-body-row > div { + /*vertical alignment*/ + position: relative; + top: 10px; +} + +:host /deep/ .datatable-body-row { + color: #222222; + border-bottom: 1px solid grey; +} + +:host /deep/ .datatable-body-row:hover { + background-color: #f7f7f7; +} + diff --git a/static/src/app/statistic/war-detail/war-detail.component.html b/static/src/app/statistic/war-detail/war-detail.component.html index 655f1c0..6ff3d83 100644 --- a/static/src/app/statistic/war-detail/war-detail.component.html +++ b/static/src/app/statistic/war-detail/war-detail.component.html @@ -50,11 +50,32 @@ -