]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-video-miniature/video-miniature.component.ts
Refactor actor avatar display
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-miniature / video-miniature.component.ts
index 987a65e4021801facf38549571c4fe46c3fbcff7..8d66aaee2c9a42bc495dd3f83e103896b6ce149e 100644 (file)
@@ -16,7 +16,6 @@ import { Video } from '../shared-main'
 import { VideoPlaylistService } from '../shared-video-playlist'
 import { VideoActionsDisplayType } from './video-actions-dropdown.component'
 
-export type OwnerDisplayType = 'account' | 'videoChannel'
 export type MiniatureDisplayOptions = {
   date?: boolean
   views?: boolean
@@ -50,9 +49,9 @@ export class VideoMiniatureComponent implements OnInit {
     state: false,
     blacklistInfo: false
   }
-  @Input() displayAsRow = false
   @Input() displayVideoActions = true
-  @Input() fitWidth = false
+
+  @Input() displayAsRow = false
 
   @Input() videoLinkType: VideoLinkType = 'internal'
 
@@ -183,7 +182,7 @@ export class VideoMiniatureComponent implements OnInit {
 
   getAvatarUrl () {
     if (this.displayOwnerAccount()) {
-      return this.video.accountAvatarUrl
+      return this.video.account.avatar?.url
     }
 
     return this.video.videoChannelAvatarUrl
@@ -243,6 +242,12 @@ export class VideoMiniatureComponent implements OnInit {
     return this.displayVideoActions && this.isUserLoggedIn() && this.inWatchLaterPlaylist !== undefined
   }
 
+  getClasses () {
+    return {
+      'display-as-row': this.displayAsRow
+    }
+  }
+
   private setUpBy () {
     const accountName = this.video.account.name