aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+video-channels/video-channel-about
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+video-channels/video-channel-about')
-rw-r--r--client/src/app/+video-channels/video-channel-about/video-channel-about.component.html12
-rw-r--r--client/src/app/+video-channels/video-channel-about/video-channel-about.component.scss8
-rw-r--r--client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts32
3 files changed, 52 insertions, 0 deletions
diff --git a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.html b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.html
new file mode 100644
index 000000000..65ad6f541
--- /dev/null
+++ b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.html
@@ -0,0 +1,12 @@
1<div *ngIf="videoChannel" class="row">
2 <div class="description col-md-6 col-sm-12">
3 <div class="small-title">Description</div>
4 <div class="content">{{ getVideoChannelDescription() }}</div>
5 </div>
6
7 <div class="stats col-md-6 col-sm-12">
8 <div class="small-title">Stats</div>
9
10 <div class="content">Created {{ videoChannel.createdAt | date }}</div>
11 </div>
12</div> \ No newline at end of file
diff --git a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.scss b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.scss
new file mode 100644
index 000000000..b1be7d4ed
--- /dev/null
+++ b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.scss
@@ -0,0 +1,8 @@
1@import '_variables';
2@import '_mixins';
3
4.small-title {
5 @include in-content-small-title;
6
7 margin-bottom: 20px;
8}
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
new file mode 100644
index 000000000..5d435708e
--- /dev/null
+++ b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts
@@ -0,0 +1,32 @@
1import { Component, OnInit } from '@angular/core'
2import { ActivatedRoute } from '@angular/router'
3import 'rxjs/add/observable/from'
4import 'rxjs/add/operator/concatAll'
5import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
6import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
7
8@Component({
9 selector: 'my-video-channel-about',
10 templateUrl: './video-channel-about.component.html',
11 styleUrls: [ './video-channel-about.component.scss' ]
12})
13export class VideoChannelAboutComponent implements OnInit {
14 videoChannel: VideoChannel
15
16 constructor (
17 protected route: ActivatedRoute,
18 private videoChannelService: VideoChannelService
19 ) { }
20
21 ngOnInit () {
22 // Parent get the video channel for us
23 this.videoChannelService.videoChannelLoaded
24 .subscribe(videoChannel => this.videoChannel = videoChannel)
25 }
26
27 getVideoChannelDescription () {
28 if (this.videoChannel.description) return this.videoChannel.description
29
30 return 'No description'
31 }
32}