diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-09 14:55:06 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-09 14:55:06 +0200 |
commit | 63347a0ff966c7863e5b7431effa1cb0668df893 (patch) | |
tree | 8f89d9b4a73f7157103574c05832eff21e338272 /client/src/app/videos/+video-watch/modal/video-support.component.ts | |
parent | b34a444e291c8ec90b4c2c965f7d0d6904d1faa7 (diff) | |
download | PeerTube-63347a0ff966c7863e5b7431effa1cb0668df893.tar.gz PeerTube-63347a0ff966c7863e5b7431effa1cb0668df893.tar.zst PeerTube-63347a0ff966c7863e5b7431effa1cb0668df893.zip |
Migrate to bootstrap 4 and ng-bootstrap
Diffstat (limited to 'client/src/app/videos/+video-watch/modal/video-support.component.ts')
-rw-r--r-- | client/src/app/videos/+video-watch/modal/video-support.component.ts | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/client/src/app/videos/+video-watch/modal/video-support.component.ts b/client/src/app/videos/+video-watch/modal/video-support.component.ts index c515298a0..2d400e0be 100644 --- a/client/src/app/videos/+video-watch/modal/video-support.component.ts +++ b/client/src/app/videos/+video-watch/modal/video-support.component.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component, Input, ViewChild } from '@angular/core' | 1 | import { Component, Input, ViewChild } from '@angular/core' |
2 | import { MarkdownService } from '@app/videos/shared' | 2 | import { MarkdownService } from '@app/videos/shared' |
3 | 3 | ||
4 | import { ModalDirective } from 'ngx-bootstrap/modal' | ||
5 | import { VideoDetails } from '../../../shared/video/video-details.model' | 4 | import { VideoDetails } from '../../../shared/video/video-details.model' |
5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | ||
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
8 | selector: 'my-video-support', | 8 | selector: 'my-video-support', |
@@ -12,21 +12,19 @@ import { VideoDetails } from '../../../shared/video/video-details.model' | |||
12 | export class VideoSupportComponent { | 12 | export class VideoSupportComponent { |
13 | @Input() video: VideoDetails = null | 13 | @Input() video: VideoDetails = null |
14 | 14 | ||
15 | @ViewChild('modal') modal: ModalDirective | 15 | @ViewChild('modal') modal: NgbModal |
16 | 16 | ||
17 | videoHTMLSupport = '' | 17 | videoHTMLSupport = '' |
18 | 18 | ||
19 | constructor (private markdownService: MarkdownService) { | 19 | constructor ( |
20 | private markdownService: MarkdownService, | ||
21 | private modalService: NgbModal | ||
22 | ) { | ||
20 | // empty | 23 | // empty |
21 | } | 24 | } |
22 | 25 | ||
23 | show () { | 26 | show () { |
24 | this.modal.show() | ||
25 | |||
26 | this.videoHTMLSupport = this.markdownService.enhancedMarkdownToHTML(this.video.support) | 27 | this.videoHTMLSupport = this.markdownService.enhancedMarkdownToHTML(this.video.support) |
27 | } | 28 | this.modalService.open(this.modal) |
28 | |||
29 | hide () { | ||
30 | this.modal.hide() | ||
31 | } | 29 | } |
32 | } | 30 | } |