1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/frame/frame.component.ts

30 lines
785 B
TypeScript
Raw Normal View History

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