Compare commits
No commits in common. "9fb39b0af2d0a29bdcf9086f4c090dd1f9e6fb72" and "f6317d7fbc7fd9fcd83d4fae87335c4149e57c1c" have entirely different histories.
9fb39b0af2
...
f6317d7fbc
|
@ -24,9 +24,6 @@ const vehicleRegex = /(vehicle:\s(.*?)\))/;
|
|||
const categoryRegex = /(category:\s(.*?)\))/;
|
||||
|
||||
const parseWarLog = (lineArray, war) => {
|
||||
let flagBlufor = true;
|
||||
let flagOpfor = true;
|
||||
|
||||
const NAME_TOO_LONG_ERROR = 'Error: ENAMETOOLONG: name too long, open \'';
|
||||
|
||||
const stats = {
|
||||
|
@ -167,21 +164,11 @@ const parseWarLog = (lineArray, war) => {
|
|||
/**
|
||||
* FLAG
|
||||
*/
|
||||
stats.clean.push(line);
|
||||
const playerName = line.substring(line.lastIndexOf('rt von ') + 7).slice(0, -1);
|
||||
const flagFraction = line.includes('NATO Flagge') ? 'BLUFOR' : 'OPFOR';
|
||||
const capture = !!line.includes('Flagge erobert');
|
||||
|
||||
if ((flagFraction === 'BLUFOR' && ((capture && flagBlufor) || (!capture && !flagBlufor))) ||
|
||||
(flagFraction === 'OPFOR' && ((capture && flagOpfor) || (!capture && !flagOpfor)))) {
|
||||
stats.clean.push(line);
|
||||
|
||||
const playerName = line.substring(line.lastIndexOf('rt von ') + 7).slice(0, -1);
|
||||
|
||||
if (flagFraction === 'BLUFOR') {
|
||||
flagBlufor = !capture;
|
||||
} else if (flagFraction === 'OPFOR') {
|
||||
flagOpfor = !capture;
|
||||
}
|
||||
|
||||
stats.flag.push({
|
||||
war: war._id,
|
||||
time: getFullTimeDate(war.date, line.split(WHITESPACE)[5]),
|
||||
|
@ -189,7 +176,6 @@ const parseWarLog = (lineArray, war) => {
|
|||
flagFraction: flagFraction,
|
||||
capture: capture,
|
||||
});
|
||||
}
|
||||
} else if (line.includes('(Punkte)')) {
|
||||
/**
|
||||
* POINTS
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
<li *ngIf="!loginService.isLoggedIn()" routerLinkActive="active">
|
||||
<a routerLink='{{config.loginPath}}' class="link">{{'navigation.top.login' | translate}}</a>
|
||||
</li>
|
||||
<li class="dropdown" *ngIf="FEATURE_LOCALIZATION_ENABLED">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
|
||||
aria-expanded="false" style="padding: 12px 12px 10px 12px;">
|
||||
<mat-icon svgIcon="{{(language === 'de') ? 'flag-de' : 'flag-gb'}}"></mat-icon>
|
||||
|
|
|
@ -6,7 +6,7 @@ import {AwardingService} from './services/army-management/awarding.service';
|
|||
import {RouteConfig} from './app.config';
|
||||
import {DOCUMENT} from '@angular/common';
|
||||
import {DomSanitizer} from '@angular/platform-browser';
|
||||
import {MatIconRegistry} from '@angular/material';
|
||||
import {MatIconRegistry, MatSelectChange} from '@angular/material';
|
||||
import {SpinnerService} from './services/user-interface/spinner/spinner.service';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {SettingsService} from './services/settings.service';
|
||||
|
@ -20,8 +20,6 @@ declare function require(url: string);
|
|||
})
|
||||
export class AppComponent implements OnInit {
|
||||
|
||||
readonly FEATURE_LOCALIZATION_ENABLED = false;
|
||||
|
||||
config = RouteConfig;
|
||||
|
||||
loading = false;
|
||||
|
|
|
@ -33,7 +33,7 @@ export class CampaignService {
|
|||
|
||||
submitCampaign(campaign: Campaign) {
|
||||
let requestUrl: string;
|
||||
let requestMethod: RequestMethod;
|
||||
let requestMethod: RequestMethod
|
||||
let accessType;
|
||||
|
||||
if (campaign._id) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{{'stats.campaign.title.all.time.overview' | translate}}
|
||||
</div>
|
||||
<div class="campaign-entry"
|
||||
*ngFor="let campaign of campaigns$ | async"
|
||||
*ngFor="let campaign of campaigns"
|
||||
[ngClass]="{active : campaign._id === selectedCampaignId}"
|
||||
(click)="select(campaign)">
|
||||
{{campaign.title}}
|
||||
|
|
|
@ -1,25 +1,15 @@
|
|||
import {
|
||||
Component,
|
||||
ElementRef,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnInit,
|
||||
Output,
|
||||
ViewChild
|
||||
} from '@angular/core';
|
||||
import {Component, ElementRef, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewChild} from '@angular/core';
|
||||
import {Campaign} from '../../../models/model-interfaces';
|
||||
import {LoginService} from '../../../services/app-user-service/login-service';
|
||||
import {Observable} from 'rxjs';
|
||||
import {CampaignService} from '../../../services/logs/campaign.service';
|
||||
|
||||
@Component({
|
||||
selector: 'campaign-navigation',
|
||||
templateUrl: './campaign-navigation.component.html',
|
||||
styleUrls: ['./campaign-navigation.component.css']
|
||||
})
|
||||
export class CampaignNavigationComponent implements OnInit {
|
||||
export class CampaignNavigationComponent implements OnChanges {
|
||||
|
||||
campaigns$: Observable<Campaign[]>;
|
||||
@Input() campaigns: Campaign[];
|
||||
|
||||
@Input() selectedCampaignId;
|
||||
|
||||
|
@ -37,15 +27,13 @@ export class CampaignNavigationComponent implements OnInit {
|
|||
|
||||
repeater;
|
||||
|
||||
constructor(public loginService: LoginService,
|
||||
private campaignService: CampaignService) {
|
||||
this.campaigns$ = campaignService.campaigns$;
|
||||
constructor(public loginService: LoginService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.campaigns$.subscribe(campaigns => {
|
||||
this.isRightScrollVisible = campaigns.length > 4;
|
||||
});
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
if (!changes.selectedCampaignId) {
|
||||
this.isRightScrollVisible = this.campaigns.length > 4;
|
||||
}
|
||||
}
|
||||
|
||||
select(campaign) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<campaign-navigation
|
||||
[campaigns]="campaigns"
|
||||
[selectedCampaignId]="selectedCampaign._id"
|
||||
(campaignSelect)="switchCampaign($event)"
|
||||
(campaignEdit)="editCampaign($event)"
|
||||
|
|
Loading…
Reference in New Issue