From b2731bff2834fb6aacf166cf435030bf96eb12f3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 12 Dec 2017 14:41:59 +0100 Subject: Small style fixes --- client/src/app/shared/video/abstract-video-list.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'client/src/app/shared') 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' import { ActivatedRoute, Router } from '@angular/router' import { NotificationsService } from 'angular2-notifications' import { Observable } from 'rxjs/Observable' +import { AuthService } from '../../core/auth' import { SortField } from './sort-field.type' import { VideoPagination } from './video-pagination.model' import { Video } from './video.model' @@ -17,9 +18,10 @@ export abstract class AbstractVideoList implements OnInit { videos: Video[] = [] loadOnInit = true - protected notificationsService: NotificationsService - protected router: Router - protected route: ActivatedRoute + protected abstract notificationsService: NotificationsService + protected abstract authService: AuthService + protected abstract router: Router + protected abstract route: ActivatedRoute protected abstract currentRoute: string @@ -28,6 +30,10 @@ export abstract class AbstractVideoList implements OnInit { abstract getVideosObservable (): Observable<{ videos: Video[], totalVideos: number}> + get user () { + return this.authService.getUser() + } + ngOnInit () { // Subscribe to route changes const routeParams = this.route.snapshot.params -- cgit v1.2.3