1
|
import { Component, OnInit } from '@angular/core';
|
2
|
import { AuthenticationService } from '../../../services/authentication.service';
|
3
|
import { StatisticsService } from '../../../services/statistics.service';
|
4
|
import { Router } from '@angular/router';
|
5
|
|
6
|
@Component ({
|
7
|
selector: 'app-about',
|
8
|
templateUrl: './about.component.html',
|
9
|
styleUrls: ['../../../../assets/css/landingpage/theme.css','../../../../assets/css/landingpage/custom.css','../../../../assets/css/landingpage/custom-provide.css'],
|
10
|
})
|
11
|
|
12
|
export class AboutComponent implements OnInit {
|
13
|
|
14
|
constructor(private authService: AuthenticationService,
|
15
|
private statsService: StatisticsService,
|
16
|
private router: Router) { }
|
17
|
|
18
|
ngOnInit() {
|
19
|
let body = document.getElementsByTagName('body')[0];
|
20
|
body.classList.remove("dashboard");
|
21
|
body.classList.add("landing");
|
22
|
}
|
23
|
|
24
|
login() {
|
25
|
this.authService.loginWithState();
|
26
|
}
|
27
|
|
28
|
|
29
|
goToPage(pageUrl: string) {
|
30
|
if (this.authService.getIsUserLoggedIn()) {
|
31
|
this.router.navigate([pageUrl]);
|
32
|
} else {
|
33
|
this.authService.redirectUrl = pageUrl;
|
34
|
this.login();
|
35
|
}
|
36
|
}
|
37
|
|
38
|
}
|