]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-library/my-videos/my-videos.component.ts
Refactor horizontal margins
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-library / my-videos / my-videos.component.ts
index e89bb12e1655be600b744cd2ae7eaeb25a88a4fe..0bc923e73216f15d2a5d62dc78cee5936e1d70b8 100644 (file)
@@ -2,12 +2,12 @@ import { concat, Observable, Subject } from 'rxjs'
 import { debounceTime, tap, toArray } from 'rxjs/operators'
 import { Component, OnInit, ViewChild } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
-import { AuthService, ComponentPagination, ConfirmService, Notifier, ScreenService, ServerService } from '@app/core'
+import { AuthService, ComponentPagination, ConfirmService, Notifier, ScreenService, ServerService, User } from '@app/core'
 import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook'
 import { immutableAssign } from '@app/helpers'
 import { DropdownAction, Video, VideoService } from '@app/shared/shared-main'
 import { LiveStreamInformationComponent } from '@app/shared/shared-video-live'
-import { MiniatureDisplayOptions, OwnerDisplayType, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature'
+import { MiniatureDisplayOptions, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature'
 import { VideoSortField } from '@shared/models'
 import { VideoChangeOwnershipComponent } from './modals/video-change-ownership.component'
 
@@ -36,7 +36,6 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook {
     state: true,
     blacklistInfo: true
   }
-  ownerDisplayType: OwnerDisplayType = 'videoChannel'
 
   videoActions: DropdownAction<{ video: Video }>[] = []
 
@@ -45,6 +44,8 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook {
   videosSearchChanged = new Subject<string>()
   getVideosObservableFunction = this.getVideosObservable.bind(this)
 
+  user: User
+
   constructor (
     protected router: Router,
     protected serverService: ServerService,
@@ -61,6 +62,8 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook {
   ngOnInit () {
     this.buildActions()
 
+    this.user = this.authService.getUser()
+
     this.videosSearchChanged
       .pipe(debounceTime(500))
       .subscribe(() => {