]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/+video-watch/modal/video-support.component.ts
replace fs by fs-extra to prevent EMFILE error
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / modal / video-support.component.ts
1 import { Component, Input, ViewChild } from '@angular/core'
2 import { MarkdownService } from '@app/videos/shared'
3
4 import { VideoDetails } from '../../../shared/video/video-details.model'
5 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
6
7 @Component({
8 selector: 'my-video-support',
9 templateUrl: './video-support.component.html',
10 styleUrls: [ './video-support.component.scss' ]
11 })
12 export class VideoSupportComponent {
13 @Input() video: VideoDetails = null
14
15 @ViewChild('modal') modal: NgbModal
16
17 videoHTMLSupport = ''
18
19 constructor (
20 private markdownService: MarkdownService,
21 private modalService: NgbModal
22 ) {
23 // empty
24 }
25
26 show () {
27 this.videoHTMLSupport = this.markdownService.enhancedMarkdownToHTML(this.video.support)
28 this.modalService.open(this.modal)
29 }
30 }