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=c80ea2e6b0f2cb8fe9931b0b1b4b173a7f400204;hpb=cf21b2cbef61929177b9c09b5e017c3b7eb8535d;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 c80ea2e6b..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 () {