]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-watch/modal/video-support.component.ts
Slightly more personal support modal
[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'
1053480b 5import { User } from '@app/shared'
07fa4c97
C
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
1053480b 14 @Input() user: User = null
07fa4c97 15
f36da21e 16 @ViewChild('modal', { static: true }) modal: NgbModal
07fa4c97
C
17
18 videoHTMLSupport = ''
19
63347a0f
C
20 constructor (
21 private markdownService: MarkdownService,
22 private modalService: NgbModal
23db998f 23 ) { }
07fa4c97
C
24
25 show () {
63347a0f 26 this.modalService.open(this.modal)
41d71344
C
27
28 this.markdownService.enhancedMarkdownToHTML(this.video.support)
29 .then(r => this.videoHTMLSupport = r)
07fa4c97
C
30 }
31}