blob: c515298a07d5fd32fdd302625ed42b20f93229c4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
import { Component, Input, ViewChild } from '@angular/core'
import { MarkdownService } from '@app/videos/shared'
import { ModalDirective } from 'ngx-bootstrap/modal'
import { VideoDetails } from '../../../shared/video/video-details.model'
@Component({
selector: 'my-video-support',
templateUrl: './video-support.component.html',
styleUrls: [ './video-support.component.scss' ]
})
export class VideoSupportComponent {
@Input() video: VideoDetails = null
@ViewChild('modal') modal: ModalDirective
videoHTMLSupport = ''
constructor (private markdownService: MarkdownService) {
// empty
}
show () {
this.modal.show()
this.videoHTMLSupport = this.markdownService.enhancedMarkdownToHTML(this.video.support)
}
hide () {
this.modal.hide()
}
}
|