X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-video-playlist%2Fvideo-playlist-miniature.component.ts;h=225c4eb644d2fcf7790314b86b7a5797cfa74e9f;hb=0e45e336f62a411b3c423be46d16252355c754d7;hp=8de5092a95c6b61cf11d05025895822c66787b23;hpb=37a44fc915eef2140e22ceb96aba6b6eb2509007;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.ts b/client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.ts index 8de5092a9..225c4eb64 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.ts @@ -1,6 +1,7 @@ import { LinkType } from 'src/types/link.type' import { Component, Input, OnInit } from '@angular/core' import { VideoPlaylist } from './video-playlist.model' +import { MarkdownService } from '@app/core' @Component({ selector: 'my-video-playlist-miniature', @@ -22,9 +23,17 @@ export class VideoPlaylistMiniatureComponent implements OnInit { routerLink: any playlistHref: string playlistTarget: string + playlistDescription: string - ngOnInit () { + constructor ( + private markdownService: MarkdownService + ) {} + + async ngOnInit () { this.buildPlaylistUrl() + if (this.displayDescription) { + this.playlistDescription = await this.markdownService.textMarkdownToHTML({ markdown: this.playlist.description }) + } } buildPlaylistUrl () { @@ -39,7 +48,7 @@ export class VideoPlaylistMiniatureComponent implements OnInit { } if (this.linkType === 'internal' || !this.playlist.url) { - this.routerLink = [ '/w/p', this.playlist.uuid ] + this.routerLink = VideoPlaylist.buildWatchUrl(this.playlist) return }