]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/video/video-miniature.component.ts
Use default nsfw instance policy for search index
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / video-miniature.component.ts
index f0b0992e2ad4eb3056a7390f629f3d6c1ca73613..36e18d018bffef0735eeaeac1f6f37278ddc05fd 100644 (file)
@@ -78,6 +78,7 @@ export class VideoMiniatureComponent implements OnInit {
   addToWatchLaterText: string
   addedToWatchLaterText: string
   inWatchLaterPlaylist: boolean
+  channelLinkTitle = ''
 
   watchLaterPlaylist: {
     id: number
@@ -96,9 +97,7 @@ export class VideoMiniatureComponent implements OnInit {
     private videoPlaylistService: VideoPlaylistService,
     private cd: ChangeDetectorRef,
     @Inject(LOCALE_ID) private localeId: string
-  ) {
-
-  }
+  ) {}
 
   get isVideoBlur () {
     return this.video.isVideoNSFWForUser(this.user, this.serverConfig)
@@ -114,6 +113,11 @@ export class VideoMiniatureComponent implements OnInit {
 
     this.setUpBy()
 
+    this.channelLinkTitle = this.i18n(
+      'Go to the channel page of {{name}} ({{handle}})',
+      { name: this.video.channel.name, handle: this.video.byVideoChannel }
+    )
+
     // We rely on mouseenter to lazy load actions
     if (this.screenService.isInTouchScreen()) {
       this.loadActions()
@@ -178,6 +182,14 @@ export class VideoMiniatureComponent implements OnInit {
     return ''
   }
 
+  getAvatarUrl () {
+    if (this.ownerDisplayTypeChosen === 'account') {
+      return this.video.accountAvatarUrl
+    }
+
+    return this.video.videoChannelAvatarUrl
+  }
+
   loadActions () {
     if (this.displayVideoActions) this.showActions = true