diff --git a/package.json b/package.json index 82d6916..212fa65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opt-cc", - "version": "1.8.0", + "version": "1.8.1", "author": "Florian Hartwich ", "private": true, "scripts": { diff --git a/static/src/app/app.component.ts b/static/src/app/app.component.ts index aefd2a0..b104fc2 100644 --- a/static/src/app/app.component.ts +++ b/static/src/app/app.component.ts @@ -31,23 +31,28 @@ export class AppComponent implements OnInit { svgIcons = { 'add': 'outline-add_box-24px', 'add-user': 'twotone-person_add-24px', - 'edit': 'baseline-edit-24px', - 'delete': 'baseline-delete-24px', - 'stats-detail': 'round-assessment-24px', + 'arrow-up': 'baseline-arrow_upward-24px', 'chevron-left': 'baseline-chevron_left-24px', 'chevron-right': 'baseline-chevron_right-24px', - 'arrow-up': 'baseline-arrow_upward-24px', + 'delete': 'baseline-delete-24px', + 'edit': 'baseline-edit-24px', 'more-vert': 'baseline-more_vert-24px', // --------STATISTICS--------- 'award': 'stats/award', 'battle': 'stats/battle', - 'flagTouch': 'stats/flagTouch', - 'friendlyFire': 'stats/friendlyFire', 'highscore': 'stats/highscore', - 'kill': 'stats/kill', - 'respawn': 'stats/respawn', - 'revive': 'stats/respawn', 'stats-chart': 'stats/statsChart', + // --SCOREBOARD-- + 'death': 'stats/scoreboard/death', + 'flagTouch': 'stats/scoreboard/flagTouch', + 'friendlyFire': 'stats/scoreboard/friendlyFire', + 'kill': 'stats/scoreboard/kill', + 'respawn': 'stats/scoreboard/respawn', + 'revive': 'stats/scoreboard/revive', + 'stats-detail': 'stats/scoreboard/round-assessment-24px', + 'vehicleAir': 'stats/scoreboard/vehicleAir', + 'vehicleHeavy': 'stats/scoreboard/vehicleHeavy', + 'vehicleLight': 'stats/scoreboard/vehicleLight', }; version = 'v'.concat(require('./../../../package.json').version); @@ -87,7 +92,7 @@ export class AppComponent implements OnInit { initMaterialSvgIcons() { Object.keys(this.svgIcons).forEach(key => { const fileUri = '../assets/icon/'.concat(this.svgIcons[key]) - .concat('.svg'); + .concat('.svg'); this.iconRegistry.addSvgIcon(key, this.sanitizer.bypassSecurityTrustResourceUrl(fileUri)); }); } diff --git a/static/src/app/statistic/campaign/highscore/highscore.component.css b/static/src/app/statistic/campaign/highscore/highscore.component.css index 2f8a387..29d9027 100644 --- a/static/src/app/statistic/campaign/highscore/highscore.component.css +++ b/static/src/app/statistic/campaign/highscore/highscore.component.css @@ -26,11 +26,6 @@ h2 { width: 100%; } -table.mat-table img { - filter: invert(60%); - margin-left: -15px; -} - :host /deep/ table.mat-table > thead { position: absolute; width: 320px; @@ -46,6 +41,26 @@ table.mat-table img { text-indent: 14px; } +.mat-column-vehicleLight mat-icon.mat-icon { + width: 28px; + margin-bottom: 5px; +} + +.mat-column-vehicleHeavy mat-icon.mat-icon { + width: 33px; + margin-top: 5px; +} + +.mat-column-vehicleAir mat-icon.mat-icon { + width: 35px; + margin-bottom: 5px; +} + +:host /deep/ .mat-table .mat-icon { + color: #666666; + margin-left: -32px; +} + /* Table Scrollbar BEGIN */ .highscore-table-container::-webkit-scrollbar { diff --git a/static/src/app/statistic/campaign/highscore/highscore.component.html b/static/src/app/statistic/campaign/highscore/highscore.component.html index 5b0b146..41b3c5e 100644 --- a/static/src/app/statistic/campaign/highscore/highscore.component.html +++ b/static/src/app/statistic/campaign/highscore/highscore.component.html @@ -35,9 +35,9 @@ - {{attributeMap.head}} + + {{element[attributeMap.prop]}} 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 47566cc..20755c4 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 @@ -21,7 +21,7 @@ export class FractionStatsComponent implements OnInit, OnChanges { @Input() logData: any; startDateObj: Date; - + load initialized: any; public activeChartSelect: string; @@ -274,40 +274,46 @@ export class FractionStatsComponent implements OnInit, OnChanges { const vehicleEntryDate = new Date(vehicleEntry.time); if (vehicleEntry.fraction === 'BLUFOR') { vehicleKillCountBlufor++; - switch (vehicleEntry.vehicleClass) { - case 'LIGHT': - vehicleLightCountBlufor++; - break; - case 'HEAVY': - vehicleHeavyCountBlufor++; - break; - case 'AIR': - vehicleAirCountBlufor++; - break; + if (vehicleEntry.vehicleClass) { + switch (vehicleEntry.vehicleClass) { + case 'LIGHT': + vehicleLightCountBlufor++; + break; + case 'HEAVY': + vehicleHeavyCountBlufor++; + break; + case 'AIR': + vehicleAirCountBlufor++; + break; + } } } else { vehicleKillCountOpfor++; - switch (vehicleEntry.vehicleClass) { - case 'LIGHT': - vehicleLightCountOpfor++; - break; - case 'HEAVY': - vehicleHeavyCountOpfor++; - break; - case 'AIR': - vehicleAirCountOpfor++; - break; + if (vehicleEntry.vehicleClass) { + switch (vehicleEntry.vehicleClass) { + case 'LIGHT': + vehicleLightCountOpfor++; + break; + case 'HEAVY': + vehicleHeavyCountOpfor++; + break; + case 'AIR': + vehicleAirCountOpfor++; + break; + } } } if (this.isTwoMinutesAhead(vehicleEntryDate, this.tmpVehicleData) || index === this.logData.vehicle.length - 1) { this.tmpVehicleData[0].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleKillCountBlufor)); this.tmpVehicleData[1].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleKillCountOpfor)); - this.tmpVehicleData[2].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleLightCountBlufor)); - this.tmpVehicleData[3].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleLightCountOpfor)); - this.tmpVehicleData[4].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleHeavyCountBlufor)); - this.tmpVehicleData[5].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleHeavyCountOpfor)); - this.tmpVehicleData[6].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleAirCountBlufor)); - this.tmpVehicleData[7].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleAirCountOpfor)); + if (vehicleEntry.vehicleClass) { + this.tmpVehicleData[2].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleLightCountBlufor)); + this.tmpVehicleData[3].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleLightCountOpfor)); + this.tmpVehicleData[4].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleHeavyCountBlufor)); + this.tmpVehicleData[5].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleHeavyCountOpfor)); + this.tmpVehicleData[6].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleAirCountBlufor)); + this.tmpVehicleData[7].series.push(ChartUtils.getSeriesEntry(vehicleEntryDate, vehicleAirCountOpfor)); + } } } this.addFinalTimeData(this.tmpVehicleData); @@ -396,7 +402,9 @@ export class FractionStatsComponent implements OnInit, OnChanges { this.tmpBudgetData[1].series.push(ChartUtils.getSeriesEntry(endDate, this.war.endBudgetOpfor)); } else { for (let j = 0; j < tmpCollection.length; j++) { - if (tmpCollection[j].series[tmpCollection[j].series.length - 1].name < endDate) { + // mayBe check is needed for logs that are simply not existent in older wars, i.e. vehicleKills + const maybeLast = tmpCollection[j].series[tmpCollection[j].series.length - 1]; + if (maybeLast && maybeLast.name < endDate) { tmpCollection[j].series.push( ChartUtils.getSeriesEntry(endDate, tmpCollection[j].series[tmpCollection[j].series.length - 1].value) ); diff --git a/static/src/app/statistic/war/scoreboard/scoreboard.component.css b/static/src/app/statistic/war/scoreboard/scoreboard.component.css index f6b1ccf..a2a28db 100644 --- a/static/src/app/statistic/war/scoreboard/scoreboard.component.css +++ b/static/src/app/statistic/war/scoreboard/scoreboard.component.css @@ -24,10 +24,6 @@ margin-top: -5px; } -table.mat-table img { - filter: invert(60%); -} - :host /deep/ table.mat-table > tbody { margin-top: 60px; display: block; @@ -47,12 +43,25 @@ table.mat-table img { text-indent: 9px; } +.mat-column-vehicleLight mat-icon.mat-icon { + width: 28px; + margin-bottom: 5px; +} + +.mat-column-vehicleHeavy mat-icon.mat-icon { + width: 33px; + margin-top: 5px; +} + +.mat-column-vehicleAir mat-icon.mat-icon { + width: 35px; + margin-bottom: 5px; +} + td.mat-cell:last-child, td.mat-footer-cell:last-child, th.mat-header-cell:last-child { padding-right: 0; } -/* MAT ICON BUTTON */ - :host /deep/ .mat-table .mat-icon { color: #666666; } diff --git a/static/src/app/statistic/war/scoreboard/scoreboard.component.html b/static/src/app/statistic/war/scoreboard/scoreboard.component.html index c5b0e10..9fc1427 100644 --- a/static/src/app/statistic/war/scoreboard/scoreboard.component.html +++ b/static/src/app/statistic/war/scoreboard/scoreboard.component.html @@ -21,9 +21,9 @@ - {{column.head}} + + {{element[column.prop]}} diff --git a/static/src/app/statistic/war/war-list/war-list.component.ts b/static/src/app/statistic/war/war-list/war-list.component.ts index a9f288d..84bed46 100644 --- a/static/src/app/statistic/war/war-list/war-list.component.ts +++ b/static/src/app/statistic/war/war-list/war-list.component.ts @@ -1,4 +1,4 @@ -import {AfterViewInit, Component, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core'; +import {Component, Input, OnChanges, SimpleChanges} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Campaign, War} from '../../../models/model-interfaces'; import {WarService} from '../../../services/logs/war.service'; diff --git a/static/src/app/style/list-entry.css b/static/src/app/style/list-entry.css index 86a734a..dfb9485 100644 --- a/static/src/app/style/list-entry.css +++ b/static/src/app/style/list-entry.css @@ -12,7 +12,7 @@ div.list-entry:hover, a.list-entry:hover { } :host/deep/.list-entry mat-icon > svg { - color: #222222; + color: #666666; } .decoration-list-preview, .squad-list-preview { diff --git a/static/src/app/users/user-list/user-item.component.css b/static/src/app/users/user-list/user-item.component.css index 2769f96..458e2b3 100644 --- a/static/src/app/users/user-list/user-item.component.css +++ b/static/src/app/users/user-list/user-item.component.css @@ -1,5 +1,4 @@ .icon-award { - background: url(../../../assets/award.png); width: 27px; height: 42px; display: block; diff --git a/static/src/app/users/user-list/user-item.component.html b/static/src/app/users/user-list/user-item.component.html index 3e74387..9436a2c 100644 --- a/static/src/app/users/user-list/user-item.component.html +++ b/static/src/app/users/user-list/user-item.component.html @@ -13,9 +13,8 @@
- - + +
diff --git a/static/src/assets/icon/stats/award.svg b/static/src/assets/icon/award.svg similarity index 100% rename from static/src/assets/icon/stats/award.svg rename to static/src/assets/icon/award.svg diff --git a/static/src/assets/icon/stats/flagTouch.svg b/static/src/assets/icon/stats/flagTouch.svg deleted file mode 100644 index e73e0b2..0000000 --- a/static/src/assets/icon/stats/flagTouch.svg +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - F - - F - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static/src/assets/icon/stats/friendlyFire.svg b/static/src/assets/icon/stats/friendlyFire.svg deleted file mode 100644 index 0a9d201..0000000 --- a/static/src/assets/icon/stats/friendlyFire.svg +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - F - - F - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static/src/assets/icon/stats/kill.svg b/static/src/assets/icon/stats/kill.svg deleted file mode 100644 index 44c90ff..0000000 --- a/static/src/assets/icon/stats/kill.svg +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - - - - - - - - - - - - - F - - F - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static/src/assets/icon/stats/revive.svg b/static/src/assets/icon/stats/revive.svg deleted file mode 100644 index e29fba7..0000000 --- a/static/src/assets/icon/stats/revive.svg +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - F - - F - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static/src/assets/icon/stats/scoreboard/death.svg b/static/src/assets/icon/stats/scoreboard/death.svg new file mode 100644 index 0000000..02d7993 --- /dev/null +++ b/static/src/assets/icon/stats/scoreboard/death.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/static/src/assets/icon/stats/scoreboard/flagTouch.svg b/static/src/assets/icon/stats/scoreboard/flagTouch.svg new file mode 100644 index 0000000..bef8ada --- /dev/null +++ b/static/src/assets/icon/stats/scoreboard/flagTouch.svg @@ -0,0 +1,10 @@ + + + + + diff --git a/static/src/assets/icon/stats/scoreboard/friendlyFire.svg b/static/src/assets/icon/stats/scoreboard/friendlyFire.svg new file mode 100644 index 0000000..ae71c2f --- /dev/null +++ b/static/src/assets/icon/stats/scoreboard/friendlyFire.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/static/src/assets/icon/stats/scoreboard/kill.svg b/static/src/assets/icon/stats/scoreboard/kill.svg new file mode 100644 index 0000000..af9346d --- /dev/null +++ b/static/src/assets/icon/stats/scoreboard/kill.svg @@ -0,0 +1,180 @@ + + + + + + + + F + + F + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/src/assets/icon/stats/respawn.svg b/static/src/assets/icon/stats/scoreboard/respawn.svg similarity index 53% rename from static/src/assets/icon/stats/respawn.svg rename to static/src/assets/icon/stats/scoreboard/respawn.svg index cb50c5e..82fea66 100644 --- a/static/src/assets/icon/stats/respawn.svg +++ b/static/src/assets/icon/stats/scoreboard/respawn.svg @@ -1,38 +1,38 @@ - - + - - - - + + - - F - - F + + F + + F - + @@ -43,32 +43,28 @@ S164-162.4,48.8-162.4z M48.8,216.1c-93.9,0-170-76.1-170-170s76.1-170,170-170s170,76.1,170,170S142.7,216.1,48.8,216.1z"/> - - - - - - - + + + @@ -82,49 +78,41 @@ L140,153c1.6,4.3,5.5,7.4,10.1,7.9C154.8,161.1,159.1,158.7,161.2,154.7z"/> - - - - - + + - - - - - - - - - + + + + + - - - - - - - - - + + + + + - - + - - - - - - - - - - - - - - - - - + + + + diff --git a/static/src/assets/icon/stats/scoreboard/revive.svg b/static/src/assets/icon/stats/scoreboard/revive.svg new file mode 100644 index 0000000..1dae119 --- /dev/null +++ b/static/src/assets/icon/stats/scoreboard/revive.svg @@ -0,0 +1,10 @@ + + + + + diff --git a/static/src/assets/icon/round-assessment-24px.svg b/static/src/assets/icon/stats/scoreboard/round-assessment-24px.svg similarity index 100% rename from static/src/assets/icon/round-assessment-24px.svg rename to static/src/assets/icon/stats/scoreboard/round-assessment-24px.svg diff --git a/static/src/assets/icon/stats/scoreboard/vehicleAir.svg b/static/src/assets/icon/stats/scoreboard/vehicleAir.svg new file mode 100644 index 0000000..a405315 --- /dev/null +++ b/static/src/assets/icon/stats/scoreboard/vehicleAir.svg @@ -0,0 +1,130 @@ + + + + + + + + + + diff --git a/static/src/assets/icon/stats/scoreboard/vehicleHeavy.svg b/static/src/assets/icon/stats/scoreboard/vehicleHeavy.svg new file mode 100644 index 0000000..965c887 --- /dev/null +++ b/static/src/assets/icon/stats/scoreboard/vehicleHeavy.svg @@ -0,0 +1,39 @@ + + + + + + + diff --git a/static/src/assets/icon/stats/scoreboard/vehicleLight.svg b/static/src/assets/icon/stats/scoreboard/vehicleLight.svg new file mode 100644 index 0000000..52c5a1b --- /dev/null +++ b/static/src/assets/icon/stats/scoreboard/vehicleLight.svg @@ -0,0 +1,51 @@ + + + + + diff --git a/static/src/assets/scoreboard/death.png b/static/src/assets/scoreboard/death.png deleted file mode 100644 index 8b5e5bb..0000000 Binary files a/static/src/assets/scoreboard/death.png and /dev/null differ diff --git a/static/src/assets/scoreboard/flagTouch.png b/static/src/assets/scoreboard/flagTouch.png deleted file mode 100644 index 883c41e..0000000 Binary files a/static/src/assets/scoreboard/flagTouch.png and /dev/null differ diff --git a/static/src/assets/scoreboard/friendlyFire.png b/static/src/assets/scoreboard/friendlyFire.png deleted file mode 100644 index e69f7c5..0000000 Binary files a/static/src/assets/scoreboard/friendlyFire.png and /dev/null differ diff --git a/static/src/assets/scoreboard/kill.png b/static/src/assets/scoreboard/kill.png deleted file mode 100644 index 4781727..0000000 Binary files a/static/src/assets/scoreboard/kill.png and /dev/null differ diff --git a/static/src/assets/scoreboard/respawn.png b/static/src/assets/scoreboard/respawn.png deleted file mode 100644 index 40c8020..0000000 Binary files a/static/src/assets/scoreboard/respawn.png and /dev/null differ diff --git a/static/src/assets/scoreboard/revive.png b/static/src/assets/scoreboard/revive.png deleted file mode 100644 index e8b826f..0000000 Binary files a/static/src/assets/scoreboard/revive.png and /dev/null differ diff --git a/static/src/assets/scoreboard/vehicleAir.png b/static/src/assets/scoreboard/vehicleAir.png deleted file mode 100644 index b3c4097..0000000 Binary files a/static/src/assets/scoreboard/vehicleAir.png and /dev/null differ diff --git a/static/src/assets/scoreboard/vehicleHeavy.png b/static/src/assets/scoreboard/vehicleHeavy.png deleted file mode 100644 index f0ec30c..0000000 Binary files a/static/src/assets/scoreboard/vehicleHeavy.png and /dev/null differ diff --git a/static/src/assets/scoreboard/vehicleLight.png b/static/src/assets/scoreboard/vehicleLight.png deleted file mode 100644 index f96487b..0000000 Binary files a/static/src/assets/scoreboard/vehicleLight.png and /dev/null differ