diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-11-20 16:09:38 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-11-21 22:09:45 +0100 |
commit | cf02fbfb17f9e04312f771f245778d31bc1b69d2 (patch) | |
tree | ffffcc63bb328be864a1f0b7ffd6a70448afc9a0 /client/src/app/videos/video-watch/video-magnet.component.ts | |
parent | 900f0d2b3cc5035568ffa0853101a12c6abcffdc (diff) | |
download | PeerTube-cf02fbfb17f9e04312f771f245778d31bc1b69d2.tar.gz PeerTube-cf02fbfb17f9e04312f771f245778d31bc1b69d2.tar.zst PeerTube-cf02fbfb17f9e04312f771f245778d31bc1b69d2.zip |
Client: move video watch modals in their own component
Diffstat (limited to 'client/src/app/videos/video-watch/video-magnet.component.ts')
-rw-r--r-- | client/src/app/videos/video-watch/video-magnet.component.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/client/src/app/videos/video-watch/video-magnet.component.ts b/client/src/app/videos/video-watch/video-magnet.component.ts new file mode 100644 index 000000000..2894e7df6 --- /dev/null +++ b/client/src/app/videos/video-watch/video-magnet.component.ts | |||
@@ -0,0 +1,27 @@ | |||
1 | import { Component, Input, ViewChild } from '@angular/core'; | ||
2 | |||
3 | import { ModalDirective } from 'ng2-bootstrap/components/modal'; | ||
4 | |||
5 | import { Video } from '../shared'; | ||
6 | |||
7 | @Component({ | ||
8 | selector: 'my-video-magnet', | ||
9 | templateUrl: './video-magnet.component.html' | ||
10 | }) | ||
11 | export class VideoMagnetComponent { | ||
12 | @Input() video: Video = null; | ||
13 | |||
14 | @ViewChild('modal') modal: ModalDirective; | ||
15 | |||
16 | constructor() { | ||
17 | // empty | ||
18 | } | ||
19 | |||
20 | show() { | ||
21 | this.modal.show(); | ||
22 | } | ||
23 | |||
24 | hide() { | ||
25 | this.modal.hide(); | ||
26 | } | ||
27 | } | ||