diff options
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r-- | client/src/app/app.component.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 354d00a7a..f53896bcf 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import { Component } from '@angular/core'; | 1 | import { Component } from '@angular/core'; |
2 | import { HTTP_PROVIDERS } from '@angular/http'; | ||
3 | import { ActivatedRoute, Router, ROUTER_DIRECTIVES } from '@angular/router'; | 2 | import { ActivatedRoute, Router, ROUTER_DIRECTIVES } from '@angular/router'; |
4 | 3 | ||
5 | import { FriendService } from './friends'; | 4 | import { FriendService } from './friends'; |
@@ -16,7 +15,7 @@ import { VideoService } from './videos'; | |||
16 | template: require('./app.component.html'), | 15 | template: require('./app.component.html'), |
17 | styles: [ require('./app.component.scss') ], | 16 | styles: [ require('./app.component.scss') ], |
18 | directives: [ ROUTER_DIRECTIVES, SearchComponent ], | 17 | directives: [ ROUTER_DIRECTIVES, SearchComponent ], |
19 | providers: [ AuthService, FriendService, HTTP_PROVIDERS, VideoService, SearchService ] | 18 | providers: [ FriendService, VideoService, SearchService ] |
20 | }) | 19 | }) |
21 | 20 | ||
22 | export class AppComponent { | 21 | export class AppComponent { |
@@ -35,14 +34,20 @@ export class AppComponent { | |||
35 | status => { | 34 | status => { |
36 | if (status === AuthStatus.LoggedIn) { | 35 | if (status === AuthStatus.LoggedIn) { |
37 | this.isLoggedIn = true; | 36 | this.isLoggedIn = true; |
37 | console.log('Logged in.'); | ||
38 | } else if (status === AuthStatus.LoggedOut) { | ||
39 | this.isLoggedIn = false; | ||
40 | console.log('Logged out.'); | ||
41 | } else { | ||
42 | console.error('Unknown auth status: ' + status); | ||
38 | } | 43 | } |
39 | } | 44 | } |
40 | ); | 45 | ); |
41 | } | 46 | } |
42 | 47 | ||
43 | // FIXME | ||
44 | logout() { | 48 | logout() { |
45 | // this._authService.logout(); | 49 | this.authService.logout(); |
50 | this.authService.setStatus(AuthStatus.LoggedOut); | ||
46 | } | 51 | } |
47 | 52 | ||
48 | makeFriends() { | 53 | makeFriends() { |