aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-12 14:41:59 +0100
committerChocobozzz <me@florianbigard.com>2017-12-12 14:41:59 +0100
commitb2731bff2834fb6aacf166cf435030bf96eb12f3 (patch)
treea519c0669ffc27712fffebc5750df54952a61100 /client/src/app/shared
parent4a7eeb62f1364678fff28fef4a83a0e9b640017c (diff)
downloadPeerTube-b2731bff2834fb6aacf166cf435030bf96eb12f3.tar.gz
PeerTube-b2731bff2834fb6aacf166cf435030bf96eb12f3.tar.zst
PeerTube-b2731bff2834fb6aacf166cf435030bf96eb12f3.zip
Small style fixes
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index ba1635a18..2b6870a78 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -2,6 +2,7 @@ import { OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { NotificationsService } from 'angular2-notifications' 3import { NotificationsService } from 'angular2-notifications'
4import { Observable } from 'rxjs/Observable' 4import { Observable } from 'rxjs/Observable'
5import { AuthService } from '../../core/auth'
5import { SortField } from './sort-field.type' 6import { SortField } from './sort-field.type'
6import { VideoPagination } from './video-pagination.model' 7import { VideoPagination } from './video-pagination.model'
7import { Video } from './video.model' 8import { Video } from './video.model'
@@ -17,9 +18,10 @@ export abstract class AbstractVideoList implements OnInit {
17 videos: Video[] = [] 18 videos: Video[] = []
18 loadOnInit = true 19 loadOnInit = true
19 20
20 protected notificationsService: NotificationsService 21 protected abstract notificationsService: NotificationsService
21 protected router: Router 22 protected abstract authService: AuthService
22 protected route: ActivatedRoute 23 protected abstract router: Router
24 protected abstract route: ActivatedRoute
23 25
24 protected abstract currentRoute: string 26 protected abstract currentRoute: string
25 27
@@ -28,6 +30,10 @@ export abstract class AbstractVideoList implements OnInit {
28 30
29 abstract getVideosObservable (): Observable<{ videos: Video[], totalVideos: number}> 31 abstract getVideosObservable (): Observable<{ videos: Video[], totalVideos: number}>
30 32
33 get user () {
34 return this.authService.getUser()
35 }
36
31 ngOnInit () { 37 ngOnInit () {
32 // Subscribe to route changes 38 // Subscribe to route changes
33 const routeParams = this.route.snapshot.params 39 const routeParams = this.route.snapshot.params