]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/video/abstract-video-list.ts
Add information concerning video privacy in my videos list
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / abstract-video-list.ts
index 024834dfc05fe14adaf461909b8d76b6f2d8f41b..7f2cf2d7eec20fb2ee33a001b7796eddc1753e12 100644 (file)
@@ -3,17 +3,14 @@ import { ActivatedRoute, Router } from '@angular/router'
 import { isInMobileView } from '@app/shared/misc/utils'
 import { InfiniteScrollerDirective } from '@app/shared/video/infinite-scroller.directive'
 import { NotificationsService } from 'angular2-notifications'
-import { PopoverModule } from 'ngx-bootstrap/popover'
 import 'rxjs/add/operator/debounceTime'
 import { Observable } from 'rxjs/Observable'
 import { fromEvent } from 'rxjs/observable/fromEvent'
 import { Subscription } from 'rxjs/Subscription'
 import { AuthService } from '../../core/auth'
 import { ComponentPagination } from '../rest/component-pagination.model'
-import { SortField } from './sort-field.type'
+import { VideoSortField } from './sort-field.type'
 import { Video } from './video.model'
-import { FeedFormat } from '../../../../../shared'
-import { VideoFeedComponent } from '@app/shared/video/video-feed.component'
 
 export abstract class AbstractVideoList implements OnInit, OnDestroy {
   private static LINES_PER_PAGE = 4
@@ -26,9 +23,9 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
     itemsPerPage: 10,
     totalItems: null
   }
-  sort: SortField = '-createdAt'
-  defaultSort: SortField = '-createdAt'
-  syndicationItems = {}
+  sort: VideoSortField = '-createdAt'
+  defaultSort: VideoSortField = '-createdAt'
+  syndicationItems = []
 
   loadOnInit = true
   pageHeight: number
@@ -157,7 +154,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
   }
 
   protected loadRouteParams (routeParams: { [ key: string ]: any }) {
-    this.sort = routeParams['sort'] as SortField || this.defaultSort
+    this.sort = routeParams['sort'] as VideoSortField || this.defaultSort
 
     if (routeParams['page'] !== undefined) {
       this.pagination.currentPage = parseInt(routeParams['page'], 10)