]>
Commit | Line | Data |
---|---|---|
07fa4c97 | 1 | import { Component, Input, ViewChild } from '@angular/core' |
07fa4c97 | 2 | import { VideoDetails } from '../../../shared/video/video-details.model' |
63347a0f | 3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
1506307f | 4 | import { MarkdownService } from '@app/shared/renderer' |
1053480b | 5 | import { 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 | }) | |
12 | export 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 | } |