aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-31 11:33:49 +0200
committerChocobozzz <me@florianbigard.com>2021-05-31 11:33:49 +0200
commit8ee25e17b88b970703f4df9e74cb4726bbffd837 (patch)
tree450d73715c747c82efe6c919ebeda6411c01c5e0 /client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
parent15f35256af15b97d2298cc44e76ffcafe73a1c88 (diff)
downloadPeerTube-8ee25e17b88b970703f4df9e74cb4726bbffd837.tar.gz
PeerTube-8ee25e17b88b970703f4df9e74cb4726bbffd837.tar.zst
PeerTube-8ee25e17b88b970703f4df9e74cb4726bbffd837.zip
Add ability to set custom markdown in description
Diffstat (limited to 'client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts')
-rw-r--r--client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts44
1 files changed, 44 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
new file mode 100644
index 000000000..c833c56c7
--- /dev/null
+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
@@ -0,0 +1,44 @@
1import { Component, Input, OnInit } from '@angular/core'
2import { AuthService } from '@app/core'
3import { Video, VideoService } from '../../shared-main'
4import { MiniatureDisplayOptions } from '../../shared-video-miniature'
5
6/*
7 * Markup component that creates a video miniature only
8*/
9
10@Component({
11 selector: 'my-video-miniature-markup',
12 templateUrl: 'video-miniature-markup.component.html',
13 styleUrls: [ 'video-miniature-markup.component.scss' ]
14})
15export class VideoMiniatureMarkupComponent implements OnInit {
16 @Input() uuid: string
17
18 video: Video
19
20 displayOptions: MiniatureDisplayOptions = {
21 date: true,
22 views: true,
23 by: true,
24 avatar: false,
25 privacyLabel: false,
26 privacyText: false,
27 state: false,
28 blacklistInfo: false
29 }
30
31 constructor (
32 private auth: AuthService,
33 private videoService: VideoService
34 ) { }
35
36 getUser () {
37 return this.auth.getUser()
38 }
39
40 ngOnInit () {
41 this.videoService.getVideo({ videoId: this.uuid })
42 .subscribe(video => this.video = video)
43 }
44}