1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00
pigallery2/frontend/app/frame/frame.component.ts

30 lines
807 B
TypeScript
Raw Normal View History

2016-05-09 17:04:56 +02:00
import {Component, ViewEncapsulation} from "@angular/core";
2016-12-26 23:36:38 +01:00
import {RouterLink} from "@angular/router";
2016-05-16 23:15:03 +02:00
import {AuthenticationService} from "../model/network/authentication.service";
2016-12-27 16:09:47 +01:00
import {UserDTO} from "../../../common/entities/UserDTO";
import {Config} from "../config/Config";
2016-05-09 17:04:56 +02:00
@Component({
selector: 'app-frame',
2016-05-09 17:04:56 +02:00
templateUrl: 'app/frame/frame.component.html',
2016-12-26 23:36:38 +01:00
providers: [RouterLink],
encapsulation: ViewEncapsulation.Emulated
})
2016-05-09 17:04:56 +02:00
export class FrameComponent {
2016-12-27 16:09:47 +01:00
user: UserDTO;
authenticationRequired:boolean = false;
2016-05-16 23:15:03 +02:00
constructor(private _authService:AuthenticationService) {
this.user = this._authService.getUser();
this.authenticationRequired = Config.Client.authenticationRequired;
2016-05-16 23:15:03 +02:00
}
2016-05-01 10:28:05 +02:00
2016-05-16 23:15:03 +02:00
logout() {
this._authService.logout();
}
}