]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-watch/modal/video-support.component.ts
Add ListOverflow component to prevent sub-menu overflow
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / modal / video-support.component.ts
CommitLineData
07fa4c97 1import { Component, Input, ViewChild } from '@angular/core'
07fa4c97 2import { VideoDetails } from '../../../shared/video/video-details.model'
63347a0f 3import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
1506307f 4import { MarkdownService } from '@app/shared/renderer'
07fa4c97
C
5
6@Component({
7 selector: 'my-video-support',
8 templateUrl: './video-support.component.html',
9 styleUrls: [ './video-support.component.scss' ]
10})
11export class VideoSupportComponent {
12 @Input() video: VideoDetails = null
13
f36da21e 14 @ViewChild('modal', { static: true }) modal: NgbModal
07fa4c97
C
15
16 videoHTMLSupport = ''
17
63347a0f
C
18 constructor (
19 private markdownService: MarkdownService,
20 private modalService: NgbModal
23db998f 21 ) { }
07fa4c97
C
22
23 show () {
24e7916c 24 this.modalService.open(this.modal, { centered: true })
41d71344
C
25
26 this.markdownService.enhancedMarkdownToHTML(this.video.support)
27 .then(r => this.videoHTMLSupport = r)
07fa4c97
C
28 }
29}