diff options
Diffstat (limited to 'client/src/app/videos/+video-watch/modal/video-share.component.ts')
-rw-r--r-- | client/src/app/videos/+video-watch/modal/video-share.component.ts | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/client/src/app/videos/+video-watch/modal/video-share.component.ts b/client/src/app/videos/+video-watch/modal/video-share.component.ts index 5c988a43b..14f557f9a 100644 --- a/client/src/app/videos/+video-watch/modal/video-share.component.ts +++ b/client/src/app/videos/+video-watch/modal/video-share.component.ts | |||
@@ -1,11 +1,9 @@ | |||
1 | import { Component, Input, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, Input, ViewChild } from '@angular/core' |
2 | |||
3 | import { NotificationsService } from 'angular2-notifications' | 2 | import { NotificationsService } from 'angular2-notifications' |
4 | |||
5 | import { ModalDirective } from 'ngx-bootstrap/modal' | ||
6 | import { VideoDetails } from '../../../shared/video/video-details.model' | 3 | import { VideoDetails } from '../../../shared/video/video-details.model' |
7 | import { buildVideoEmbed } from '../../../../assets/player/utils' | 4 | import { buildVideoEmbed } from '../../../../assets/player/utils' |
8 | import { I18n } from '@ngx-translate/i18n-polyfill' | 5 | import { I18n } from '@ngx-translate/i18n-polyfill' |
6 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | ||
9 | 7 | ||
10 | @Component({ | 8 | @Component({ |
11 | selector: 'my-video-share', | 9 | selector: 'my-video-share', |
@@ -15,9 +13,10 @@ import { I18n } from '@ngx-translate/i18n-polyfill' | |||
15 | export class VideoShareComponent { | 13 | export class VideoShareComponent { |
16 | @Input() video: VideoDetails = null | 14 | @Input() video: VideoDetails = null |
17 | 15 | ||
18 | @ViewChild('modal') modal: ModalDirective | 16 | @ViewChild('modal') modal: ElementRef |
19 | 17 | ||
20 | constructor ( | 18 | constructor ( |
19 | private modalService: NgbModal, | ||
21 | private notificationsService: NotificationsService, | 20 | private notificationsService: NotificationsService, |
22 | private i18n: I18n | 21 | private i18n: I18n |
23 | ) { | 22 | ) { |
@@ -25,11 +24,7 @@ export class VideoShareComponent { | |||
25 | } | 24 | } |
26 | 25 | ||
27 | show () { | 26 | show () { |
28 | this.modal.show() | 27 | this.modalService.open(this.modal) |
29 | } | ||
30 | |||
31 | hide () { | ||
32 | this.modal.hide() | ||
33 | } | 28 | } |
34 | 29 | ||
35 | getVideoIframeCode () { | 30 | getVideoIframeCode () { |