]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-watch/modal/video-support.component.ts
Handle when autoplay fails
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / modal / video-support.component.ts
CommitLineData
07fa4c97
C
1import { Component, Input, ViewChild } from '@angular/core'
2import { MarkdownService } from '@app/videos/shared'
3
4import { ModalDirective } from 'ngx-bootstrap/modal'
5import { VideoDetails } from '../../../shared/video/video-details.model'
6
7@Component({
8 selector: 'my-video-support',
9 templateUrl: './video-support.component.html',
10 styleUrls: [ './video-support.component.scss' ]
11})
12export class VideoSupportComponent {
13 @Input() video: VideoDetails = null
14
15 @ViewChild('modal') modal: ModalDirective
16
17 videoHTMLSupport = ''
18
19 constructor (private markdownService: MarkdownService) {
20 // empty
21 }
22
23 show () {
24 this.modal.show()
25
26 if (this.video.support) {
27 this.videoHTMLSupport = this.markdownService.enhancedMarkdownToHTML(this.video.support)
28 } else {
29 this.videoHTMLSupport = ''
30 }
31 }
32
33 hide () {
34 this.modal.hide()
35 }
36}