From 3154f38219ea6eb55532f38fee43d46821a020ee Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 4 Nov 2016 16:23:18 +0100 Subject: Client: allow to copy magnet uri --- .../app/videos/video-watch/video-watch.component.html | 19 ++++++++++++++++++- .../app/videos/video-watch/video-watch.component.ts | 14 +++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) (limited to 'client/src/app/videos') diff --git a/client/src/app/videos/video-watch/video-watch.component.html b/client/src/app/videos/video-watch/video-watch.component.html index 14947da88..d75ed3538 100644 --- a/client/src/app/videos/video-watch/video-watch.component.html +++ b/client/src/app/videos/video-watch/video-watch.component.html @@ -50,7 +50,7 @@
-
@@ -72,3 +72,20 @@ + diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/video-watch/video-watch.component.ts index 9a36c17e2..736ca7d5a 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/video-watch/video-watch.component.ts @@ -1,6 +1,8 @@ -import { Component, ElementRef, NgZone, OnDestroy, OnInit } from '@angular/core'; +import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; +import { ModalDirective } from 'ng2-bootstrap/components/modal'; + import { Video, VideoService } from '../shared'; import { WebTorrentService } from './webtorrent.service'; @@ -13,6 +15,8 @@ import { WebTorrentService } from './webtorrent.service'; export class VideoWatchComponent implements OnInit, OnDestroy { private static LOADTIME_TOO_LONG: number = 30000; + @ViewChild('magnetUriModal') magnetUriModal: ModalDirective; + downloadSpeed: number; error: boolean = false; loading: boolean = false; @@ -87,6 +91,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy { }); } + showMagnetUriModal() { + this.magnetUriModal.show(); + } + + hideMagnetUriModal() { + this.magnetUriModal.hide(); + } + private loadTooLong() { this.error = true; console.error('The video load seems to be abnormally long.'); -- cgit v1.2.3