aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-03-25 13:42:55 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-03-31 09:05:51 +0200
commit60c35932f6a14cfe83bb0e54407427cce70171ea (patch)
tree6d15665a5375e14bea8eb6d63acc8f4139372dad /client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts
parent4097c6d66cb2919c28b5bce44b259e630923fbe0 (diff)
downloadPeerTube-60c35932f6a14cfe83bb0e54407427cce70171ea.tar.gz
PeerTube-60c35932f6a14cfe83bb0e54407427cce70171ea.tar.zst
PeerTube-60c35932f6a14cfe83bb0e54407427cce70171ea.zip
Redesign channel page
Diffstat (limited to 'client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts')
-rw-r--r--client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts43
1 files changed, 0 insertions, 43 deletions
diff --git a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts
deleted file mode 100644
index 537c7d08e..000000000
--- a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts
+++ /dev/null
@@ -1,43 +0,0 @@
1import { Subscription } from 'rxjs'
2import { Component, OnDestroy, OnInit } from '@angular/core'
3import { MarkdownService } from '@app/core'
4import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
5
6@Component({
7 selector: 'my-video-channel-about',
8 templateUrl: './video-channel-about.component.html',
9 styleUrls: [ './video-channel-about.component.scss' ]
10})
11export class VideoChannelAboutComponent implements OnInit, OnDestroy {
12 videoChannel: VideoChannel
13 descriptionHTML = ''
14 supportHTML = ''
15
16 private videoChannelSub: Subscription
17
18 constructor (
19 private videoChannelService: VideoChannelService,
20 private markdownService: MarkdownService
21 ) { }
22
23 ngOnInit () {
24 // Parent get the video channel for us
25 this.videoChannelSub = this.videoChannelService.videoChannelLoaded
26 .subscribe(async videoChannel => {
27 this.videoChannel = videoChannel
28
29 this.descriptionHTML = await this.markdownService.textMarkdownToHTML(this.videoChannel.description)
30 this.supportHTML = await this.markdownService.enhancedMarkdownToHTML(this.videoChannel.support)
31 })
32 }
33
34 ngOnDestroy () {
35 if (this.videoChannelSub) this.videoChannelSub.unsubscribe()
36 }
37
38 getVideoChannelDescription () {
39 if (this.descriptionHTML) return this.descriptionHTML
40
41 return $localize`No description`
42 }
43}