Optimize style & fix username encoding
parent
aa74a0de9b
commit
325ead18c7
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "opt-cc",
|
"name": "opt-cc",
|
||||||
"version": "1.4.4",
|
"version": "1.5.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -15,6 +15,13 @@ h2 {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-back {
|
||||||
|
clear: both;
|
||||||
|
float: left;
|
||||||
|
width: 120px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.sum-container {
|
.sum-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
<h2 class="pull-left">Spielerstatistik - {{campaignPlayer.name}}</h2>
|
<h2 class="pull-left">Spielerstatistik - {{campaignPlayer.name}}</h2>
|
||||||
<h2 class="pull-right">{{campaignPlayer.campaign.title}} Kampagne</h2>
|
<h2 class="pull-right">{{campaignPlayer.campaign.title}} Kampagne</h2>
|
||||||
|
|
||||||
|
<span class="btn btn-default btn-back" (click)="navigateBack()">< Zurück</span>
|
||||||
|
|
||||||
|
|
||||||
<div class="sum-container">
|
<div class="sum-container">
|
||||||
<div class="gauge-container pull-left">
|
<div class="gauge-container pull-left">
|
||||||
|
@ -15,7 +17,7 @@
|
||||||
[min]="0"
|
[min]="0"
|
||||||
[units]="'Kill/Death'">
|
[units]="'Kill/Death'">
|
||||||
</ngx-charts-linear-gauge>
|
</ngx-charts-linear-gauge>
|
||||||
<span style="height: 150px"></span>
|
<span style="height: 150px; display: block;"></span>
|
||||||
<ngx-charts-linear-gauge
|
<ngx-charts-linear-gauge
|
||||||
[view]="[200, 100]"
|
[view]="[200, 100]"
|
||||||
[scheme]="colorScheme"
|
[scheme]="colorScheme"
|
||||||
|
|
|
@ -3,6 +3,7 @@ import {ActivatedRoute} from "@angular/router";
|
||||||
import {CampaignPlayer} from "../../models/model-interfaces";
|
import {CampaignPlayer} from "../../models/model-interfaces";
|
||||||
import {PlayerService} from "../../services/player-service/player.service";
|
import {PlayerService} from "../../services/player-service/player.service";
|
||||||
import {ChartUtils} from "../../utils/chart-utils";
|
import {ChartUtils} from "../../utils/chart-utils";
|
||||||
|
import {Location} from '@angular/common';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -28,7 +29,7 @@ export class CampaignPlayerDetailComponent {
|
||||||
yAxisRespawn = 'Respawn';
|
yAxisRespawn = 'Respawn';
|
||||||
yAxisRevive = 'Revive';
|
yAxisRevive = 'Revive';
|
||||||
yAxisCapture = 'Eroberungen';
|
yAxisCapture = 'Eroberungen';
|
||||||
|
avgLabel = 'Durchschnitt';
|
||||||
|
|
||||||
colorScheme = {
|
colorScheme = {
|
||||||
domain: ['#00ce12']
|
domain: ['#00ce12']
|
||||||
|
@ -58,8 +59,6 @@ export class CampaignPlayerDetailComponent {
|
||||||
timeline = false;
|
timeline = false;
|
||||||
roundDomains = true;
|
roundDomains = true;
|
||||||
|
|
||||||
avgLabel = 'Durchschnitt';
|
|
||||||
|
|
||||||
totalKills;
|
totalKills;
|
||||||
totalFriendlyFire;
|
totalFriendlyFire;
|
||||||
totalDeath;
|
totalDeath;
|
||||||
|
@ -73,13 +72,14 @@ export class CampaignPlayerDetailComponent {
|
||||||
|
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
|
private location: Location,
|
||||||
private playerService: PlayerService) {
|
private playerService: PlayerService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.params
|
this.route.params
|
||||||
.map(params => [params['id'], params['playerName']])
|
.map(params => [params['id'], params['playerName']])
|
||||||
.flatMap(id => this.playerService.getCampaignPlayer(id[0], id[1]))
|
.flatMap(id => this.playerService.getCampaignPlayer(id[0], encodeURIComponent(id[1])))
|
||||||
.subscribe(campaignPlayer => {
|
.subscribe(campaignPlayer => {
|
||||||
this.campaignPlayer = campaignPlayer;
|
this.campaignPlayer = campaignPlayer;
|
||||||
this.killData = this.assignData(this.yAxisKill, "kill");
|
this.killData = this.assignData(this.yAxisKill, "kill");
|
||||||
|
@ -109,7 +109,7 @@ export class CampaignPlayerDetailComponent {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.yAxisRespawn,
|
name: this.yAxisRespawn,
|
||||||
value: this.totalDeath
|
value: this.totalRespawn
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.yAxisRevive,
|
name: this.yAxisRevive,
|
||||||
|
@ -170,4 +170,8 @@ export class CampaignPlayerDetailComponent {
|
||||||
return [killObj];
|
return [killObj];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
navigateBack() {
|
||||||
|
this.location.back();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue