From 489290b8b16bede6ddfb773adad55dee6471ccfd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 21 Mar 2019 16:49:46 +0100 Subject: Restore videos list components --- client/src/app/videos/video-list/video-local.component.ts | 8 +++----- .../app/videos/video-list/video-recently-added.component.ts | 10 ++++------ client/src/app/videos/video-list/video-trending.component.ts | 7 ++----- .../videos/video-list/video-user-subscriptions.component.ts | 8 +++----- 4 files changed, 12 insertions(+), 21 deletions(-) (limited to 'client/src/app/videos/video-list') diff --git a/client/src/app/videos/video-list/video-local.component.ts b/client/src/app/videos/video-list/video-local.component.ts index c0be4b885..13d4023c2 100644 --- a/client/src/app/videos/video-list/video-local.component.ts +++ b/client/src/app/videos/video-list/video-local.component.ts @@ -1,7 +1,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { immutableAssign } from '@app/shared/misc/utils' -import { Location } from '@angular/common' import { AuthService } from '../../core/auth' import { AbstractVideoList } from '../../shared/video/abstract-video-list' import { VideoSortField } from '../../shared/video/sort-field.type' @@ -10,7 +9,7 @@ import { VideoFilter } from '../../../../../shared/models/videos/video-query.typ import { I18n } from '@ngx-translate/i18n-polyfill' import { ScreenService } from '@app/shared/misc/screen.service' import { UserRight } from '../../../../../shared/models/users' -import { Notifier } from '@app/core' +import { Notifier, ServerService } from '@app/core' @Component({ selector: 'my-videos-local', @@ -19,18 +18,17 @@ import { Notifier } from '@app/core' }) export class VideoLocalComponent extends AbstractVideoList implements OnInit, OnDestroy { titlePage: string - currentRoute = '/videos/local' sort = '-publishedAt' as VideoSortField filter: VideoFilter = 'local' constructor ( protected router: Router, + protected serverService: ServerService, protected route: ActivatedRoute, protected notifier: Notifier, protected authService: AuthService, - protected location: Location, - protected i18n: I18n, protected screenService: ScreenService, + private i18n: I18n, private videoService: VideoService ) { super() diff --git a/client/src/app/videos/video-list/video-recently-added.component.ts b/client/src/app/videos/video-list/video-recently-added.component.ts index f99c8abb6..80cef813e 100644 --- a/client/src/app/videos/video-list/video-recently-added.component.ts +++ b/client/src/app/videos/video-list/video-recently-added.component.ts @@ -1,6 +1,5 @@ import { Component, OnDestroy, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' -import { Location } from '@angular/common' import { immutableAssign } from '@app/shared/misc/utils' import { AuthService } from '../../core/auth' import { AbstractVideoList } from '../../shared/video/abstract-video-list' @@ -8,7 +7,7 @@ import { VideoSortField } from '../../shared/video/sort-field.type' import { VideoService } from '../../shared/video/video.service' import { I18n } from '@ngx-translate/i18n-polyfill' import { ScreenService } from '@app/shared/misc/screen.service' -import { Notifier } from '@app/core' +import { Notifier, ServerService } from '@app/core' @Component({ selector: 'my-videos-recently-added', @@ -17,17 +16,16 @@ import { Notifier } from '@app/core' }) export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy { titlePage: string - currentRoute = '/videos/recently-added' sort: VideoSortField = '-publishedAt' constructor ( - protected router: Router, protected route: ActivatedRoute, - protected location: Location, + protected serverService: ServerService, + protected router: Router, protected notifier: Notifier, protected authService: AuthService, - protected i18n: I18n, protected screenService: ScreenService, + private i18n: I18n, private videoService: VideoService ) { super() diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts index a66a0f97c..e2ad95bc4 100644 --- a/client/src/app/videos/video-list/video-trending.component.ts +++ b/client/src/app/videos/video-list/video-trending.component.ts @@ -1,6 +1,5 @@ import { Component, OnDestroy, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' -import { Location } from '@angular/common' import { immutableAssign } from '@app/shared/misc/utils' import { AuthService } from '../../core/auth' import { AbstractVideoList } from '../../shared/video/abstract-video-list' @@ -17,18 +16,16 @@ import { Notifier, ServerService } from '@app/core' }) export class VideoTrendingComponent extends AbstractVideoList implements OnInit, OnDestroy { titlePage: string - currentRoute = '/videos/trending' defaultSort: VideoSortField = '-trending' constructor ( protected router: Router, + protected serverService: ServerService, protected route: ActivatedRoute, protected notifier: Notifier, protected authService: AuthService, - protected location: Location, protected screenService: ScreenService, - private serverService: ServerService, - protected i18n: I18n, + private i18n: I18n, private videoService: VideoService ) { super() diff --git a/client/src/app/videos/video-list/video-user-subscriptions.component.ts b/client/src/app/videos/video-list/video-user-subscriptions.component.ts index bee828e12..2f0685ccc 100644 --- a/client/src/app/videos/video-list/video-user-subscriptions.component.ts +++ b/client/src/app/videos/video-list/video-user-subscriptions.component.ts @@ -1,7 +1,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { immutableAssign } from '@app/shared/misc/utils' -import { Location } from '@angular/common' import { AuthService } from '../../core/auth' import { AbstractVideoList } from '../../shared/video/abstract-video-list' import { VideoSortField } from '../../shared/video/sort-field.type' @@ -9,7 +8,7 @@ import { VideoService } from '../../shared/video/video.service' import { I18n } from '@ngx-translate/i18n-polyfill' import { ScreenService } from '@app/shared/misc/screen.service' import { OwnerDisplayType } from '@app/shared/video/video-miniature.component' -import { Notifier } from '@app/core' +import { Notifier, ServerService } from '@app/core' @Component({ selector: 'my-videos-user-subscriptions', @@ -18,18 +17,17 @@ import { Notifier } from '@app/core' }) export class VideoUserSubscriptionsComponent extends AbstractVideoList implements OnInit, OnDestroy { titlePage: string - currentRoute = '/videos/subscriptions' sort = '-publishedAt' as VideoSortField ownerDisplayType: OwnerDisplayType = 'auto' constructor ( protected router: Router, + protected serverService: ServerService, protected route: ActivatedRoute, protected notifier: Notifier, protected authService: AuthService, - protected location: Location, - protected i18n: I18n, protected screenService: ScreenService, + private i18n: I18n, private videoService: VideoService ) { super() -- cgit v1.2.3