aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-list/video-list.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/video-list/video-list.component.ts')
-rw-r--r--client/src/app/videos/video-list/video-list.component.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/app/videos/video-list/video-list.component.ts b/client/src/app/videos/video-list/video-list.component.ts
index d2f0ae045..35a7b6521 100644
--- a/client/src/app/videos/video-list/video-list.component.ts
+++ b/client/src/app/videos/video-list/video-list.component.ts
@@ -5,13 +5,14 @@ import { BehaviorSubject } from 'rxjs/BehaviorSubject'
5 5
6import { NotificationsService } from 'angular2-notifications' 6import { NotificationsService } from 'angular2-notifications'
7 7
8import { AuthService } from '../../core'
8import { 9import {
9 SortField, 10 SortField,
10 Video, 11 Video,
11 VideoService, 12 VideoService,
12 VideoPagination 13 VideoPagination
13} from '../shared' 14} from '../shared'
14import { Search, SearchField, SearchService } from '../../shared' 15import { Search, SearchField, SearchService, User} from '../../shared'
15 16
16@Component({ 17@Component({
17 selector: 'my-videos-list', 18 selector: 'my-videos-list',
@@ -26,6 +27,7 @@ export class VideoListComponent implements OnInit, OnDestroy {
26 totalItems: null 27 totalItems: null
27 } 28 }
28 sort: SortField 29 sort: SortField
30 user: User
29 videos: Video[] = [] 31 videos: Video[] = []
30 32
31 private search: Search 33 private search: Search
@@ -33,6 +35,7 @@ export class VideoListComponent implements OnInit, OnDestroy {
33 private subSearch: Subscription 35 private subSearch: Subscription
34 36
35 constructor ( 37 constructor (
38 private authService: AuthService,
36 private notificationsService: NotificationsService, 39 private notificationsService: NotificationsService,
37 private router: Router, 40 private router: Router,
38 private route: ActivatedRoute, 41 private route: ActivatedRoute,
@@ -41,6 +44,8 @@ export class VideoListComponent implements OnInit, OnDestroy {
41 ) {} 44 ) {}
42 45
43 ngOnInit () { 46 ngOnInit () {
47 this.user = this.authService.getUser()
48
44 // Subscribe to route changes 49 // Subscribe to route changes
45 this.subActivatedRoute = this.route.params.subscribe(routeParams => { 50 this.subActivatedRoute = this.route.params.subscribe(routeParams => {
46 this.loadRouteParams(routeParams) 51 this.loadRouteParams(routeParams)