diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-31 11:33:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-31 11:33:49 +0200 |
commit | 8ee25e17b88b970703f4df9e74cb4726bbffd837 (patch) | |
tree | 450d73715c747c82efe6c919ebeda6411c01c5e0 /client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts | |
parent | 15f35256af15b97d2298cc44e76ffcafe73a1c88 (diff) | |
download | PeerTube-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.ts | 44 |
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 @@ | |||
1 | import { Component, Input, OnInit } from '@angular/core' | ||
2 | import { AuthService } from '@app/core' | ||
3 | import { Video, VideoService } from '../../shared-main' | ||
4 | import { 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 | }) | ||
15 | export 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 | } | ||