diff options
Diffstat (limited to 'client/src/app/videos/+video-watch/modal/video-download.component.ts')
-rw-r--r-- | client/src/app/videos/+video-watch/modal/video-download.component.ts | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/client/src/app/videos/+video-watch/modal/video-download.component.ts b/client/src/app/videos/+video-watch/modal/video-download.component.ts index 2de706e47..1361146dd 100644 --- a/client/src/app/videos/+video-watch/modal/video-download.component.ts +++ b/client/src/app/videos/+video-watch/modal/video-download.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, Input, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core' |
2 | import { ModalDirective } from 'ngx-bootstrap/modal' | ||
3 | import { VideoDetails } from '../../../shared/video/video-details.model' | 2 | import { VideoDetails } from '../../../shared/video/video-details.model' |
3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | ||
4 | 4 | ||
5 | @Component({ | 5 | @Component({ |
6 | selector: 'my-video-download', | 6 | selector: 'my-video-download', |
@@ -10,12 +10,12 @@ import { VideoDetails } from '../../../shared/video/video-details.model' | |||
10 | export class VideoDownloadComponent implements OnInit { | 10 | export class VideoDownloadComponent implements OnInit { |
11 | @Input() video: VideoDetails = null | 11 | @Input() video: VideoDetails = null |
12 | 12 | ||
13 | @ViewChild('modal') modal: ModalDirective | 13 | @ViewChild('modal') modal: ElementRef |
14 | 14 | ||
15 | downloadType: 'direct' | 'torrent' | 'magnet' = 'torrent' | 15 | downloadType: 'direct' | 'torrent' | 'magnet' = 'torrent' |
16 | resolutionId: number | string = -1 | 16 | resolutionId: number | string = -1 |
17 | 17 | ||
18 | constructor () { | 18 | constructor (private modalService: NgbModal) { |
19 | // empty | 19 | // empty |
20 | } | 20 | } |
21 | 21 | ||
@@ -24,11 +24,7 @@ export class VideoDownloadComponent implements OnInit { | |||
24 | } | 24 | } |
25 | 25 | ||
26 | show () { | 26 | show () { |
27 | this.modal.show() | 27 | this.modalService.open(this.modal) |
28 | } | ||
29 | |||
30 | hide () { | ||
31 | this.modal.hide() | ||
32 | } | 28 | } |
33 | 29 | ||
34 | download () { | 30 | download () { |