From 4635f59d7c3fea4b97029f10886c62fdf38b2084 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 27 Dec 2017 16:11:53 +0100 Subject: Add video comment components --- .../+video-watch/modal/video-share.component.ts | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 client/src/app/videos/+video-watch/modal/video-share.component.ts (limited to 'client/src/app/videos/+video-watch/modal/video-share.component.ts') 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 new file mode 100644 index 000000000..678cccfb5 --- /dev/null +++ b/client/src/app/videos/+video-watch/modal/video-share.component.ts @@ -0,0 +1,48 @@ +import { Component, Input, ViewChild } from '@angular/core' + +import { NotificationsService } from 'angular2-notifications' + +import { ModalDirective } from 'ngx-bootstrap/modal' +import { VideoDetails } from '../../../shared/video/video-details.model' + +@Component({ + selector: 'my-video-share', + templateUrl: './video-share.component.html', + styleUrls: [ './video-share.component.scss' ] +}) +export class VideoShareComponent { + @Input() video: VideoDetails = null + + @ViewChild('modal') modal: ModalDirective + + constructor (private notificationsService: NotificationsService) { + // empty + } + + show () { + this.modal.show() + } + + hide () { + this.modal.hide() + } + + getVideoIframeCode () { + return '' + } + + getVideoUrl () { + return window.location.href + } + + notSecure () { + return window.location.protocol === 'http:' + } + + activateCopiedMessage () { + this.notificationsService.success('Success', 'Copied') + } +} -- cgit v1.2.3