Compare commits
No commits in common. "eaff8b4ea956941084ab72f715d0d89f7a16d984" and "81f6f0129c989d775320f8047f40c52f0f25d522" have entirely different histories.
eaff8b4ea9
...
81f6f0129c
|
@ -38,26 +38,6 @@ li {
|
||||||
color: #7e7d64;
|
color: #7e7d64;
|
||||||
}
|
}
|
||||||
|
|
||||||
#scrollTopBtn {
|
|
||||||
position: fixed; /* Fixed/sticky position */
|
|
||||||
bottom: 20px;
|
|
||||||
right: 30px;
|
|
||||||
z-index: 99;
|
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
background-color: #101010;
|
|
||||||
color: white;
|
|
||||||
font-weight: bolder;
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 7px 25px 10px 25px;
|
|
||||||
border-radius: 20px;
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#scrollTopBtn:hover {
|
|
||||||
background-color: rgba(25, 142, 25, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.unprocessed {
|
.unprocessed {
|
||||||
-webkit-animation-name: color-blink; /* Safari 4.0 - 8.0 */
|
-webkit-animation-name: color-blink; /* Safari 4.0 - 8.0 */
|
||||||
-webkit-animation-duration: 4s; /* Safari 4.0 - 8.0 */
|
-webkit-animation-duration: 4s; /* Safari 4.0 - 8.0 */
|
||||||
|
|
|
@ -86,10 +86,7 @@
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<button (click)="scrollToTop()" *ngIf="scrollTopVisible" id="scrollTopBtn" title="Scroll to top">△</button>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<span *ngIf="loading" class="load-indicator load-arrow glyphicon-refresh-animate"></span>
|
<span *ngIf="loading" class="load-indicator load-arrow glyphicon-refresh-animate"></span>
|
||||||
<div id="left">
|
<div id="left">
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import {Component, HostListener, Inject, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {NavigationEnd, NavigationStart, Router} from '@angular/router';
|
import {NavigationEnd, NavigationStart, Router} from '@angular/router';
|
||||||
import {LoginService} from './services/app-user-service/login-service';
|
import {LoginService} from './services/app-user-service/login-service';
|
||||||
import {PromotionService} from './services/army-management/promotion.service';
|
import {PromotionService} from './services/army-management/promotion.service';
|
||||||
import {AwardingService} from './services/army-management/awarding.service';
|
import {AwardingService} from './services/army-management/awarding.service';
|
||||||
import {RouteConfig} from './app.config';
|
import {RouteConfig} from './app.config';
|
||||||
import {DOCUMENT} from "@angular/common";
|
|
||||||
|
|
||||||
declare function require(url: string);
|
declare function require(url: string);
|
||||||
|
|
||||||
|
@ -19,38 +18,22 @@ export class AppComponent implements OnInit {
|
||||||
|
|
||||||
loading = false;
|
loading = false;
|
||||||
|
|
||||||
scrollTopVisible = false;
|
|
||||||
|
|
||||||
scrollBtnVisibleVal = 100;
|
|
||||||
|
|
||||||
version = 'v' + require('./../../../package.json').version;
|
version = 'v' + require('./../../../package.json').version;
|
||||||
|
|
||||||
constructor(public loginService: LoginService,
|
constructor(public loginService: LoginService,
|
||||||
private promotionService: PromotionService,
|
private promotionService: PromotionService,
|
||||||
private awardingService: AwardingService,
|
private awardingService: AwardingService,
|
||||||
private router: Router,
|
private router: Router) {
|
||||||
@Inject(DOCUMENT) private document) {
|
|
||||||
router.events.subscribe(event => {
|
router.events.subscribe(event => {
|
||||||
if (event instanceof NavigationStart) {
|
if (event instanceof NavigationStart) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
}
|
}
|
||||||
if (event instanceof NavigationEnd) {
|
if (event instanceof NavigationEnd) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
// scroll to top on route from army overview to user detail and back
|
|
||||||
if (router.url.includes('overview')) {
|
|
||||||
this.scrollToTop()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@HostListener("window:scroll", [])
|
|
||||||
onWindowScroll() {
|
|
||||||
this.scrollTopVisible = document.body.scrollTop > this.scrollBtnVisibleVal
|
|
||||||
|| document.documentElement.scrollTop > this.scrollBtnVisibleVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.loginService.hasPermission(2)) {
|
if (this.loginService.hasPermission(2)) {
|
||||||
const fraction = this.loginService.getCurrentUser().squad.fraction;
|
const fraction = this.loginService.getCurrentUser().squad.fraction;
|
||||||
|
@ -65,10 +48,5 @@ export class AppComponent implements OnInit {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollToTop() {
|
|
||||||
this.document.body.scrollTop = 0; // For Safari
|
|
||||||
this.document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,13 +96,12 @@ export class CampaignPlayerDetailComponent implements OnInit {
|
||||||
this.reviveData = this.assignData(this.yAxisRevive, 'revive');
|
this.reviveData = this.assignData(this.yAxisRevive, 'revive');
|
||||||
this.captureData = this.assignData(this.yAxisCapture, 'flagTouch');
|
this.captureData = this.assignData(this.yAxisCapture, 'flagTouch');
|
||||||
|
|
||||||
const totalDeathDiv = this.totalDeath === 0 ? 1 : this.totalDeath;
|
this.kdRatio = parseFloat((this.totalKills / (this.totalDeath === 0 ? 1 : this.totalDeath)).toFixed(2));
|
||||||
this.kdRatio = parseFloat((this.totalKills / totalDeathDiv).toFixed(2));
|
|
||||||
if (this.kdRatio > 1) {
|
if (this.kdRatio > 1) {
|
||||||
this.maxKd = this.kdRatio * 1.7;
|
this.maxKd = this.kdRatio * 1.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.respawnDeathRatio = parseFloat((this.totalRespawn / totalDeathDiv).toFixed(2));
|
this.respawnDeathRatio = parseFloat((this.totalRespawn / (this.totalDeath === 0 ? 1 : this.totalDeath)).toFixed(2));
|
||||||
|
|
||||||
this.sumData = [
|
this.sumData = [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue