From 60c35932f6a14cfe83bb0e54407427cce70171ea Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 25 Mar 2021 13:42:55 +0100 Subject: Redesign channel page --- .../video-channel-about.component.html | 22 -- .../video-channel-about.component.scss | 12 - .../video-channel-about.component.ts | 43 --- .../video-channels-routing.module.ts | 10 - .../+video-channels/video-channels.component.html | 128 ++++++-- .../+video-channels/video-channels.component.scss | 358 ++++++++++++++++++--- .../+video-channels/video-channels.component.ts | 46 ++- .../app/+video-channels/video-channels.module.ts | 2 - 8 files changed, 434 insertions(+), 187 deletions(-) delete mode 100644 client/src/app/+video-channels/video-channel-about/video-channel-about.component.html delete mode 100644 client/src/app/+video-channels/video-channel-about/video-channel-about.component.scss delete mode 100644 client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts (limited to 'client/src/app/+video-channels') 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 deleted file mode 100644 index 8dff8ba91..000000000 --- a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.html +++ /dev/null @@ -1,22 +0,0 @@ -
-
-
-
-
DESCRIPTION
-
-
- -
-
SUPPORT THIS CHANNEL
-
-
-
- -
-
-
STATS
-
Created {{ videoChannel.createdAt | date }}
-
-
-
-
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 deleted file mode 100644 index 5bcd4b561..000000000 --- a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.scss +++ /dev/null @@ -1,12 +0,0 @@ -@import '_variables'; -@import '_mixins'; - -.block { - margin-bottom: 40px; - - .small-title { - @include in-content-small-title; - - margin-bottom: 20px; - } -} 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 @@ -import { Subscription } from 'rxjs' -import { Component, OnDestroy, OnInit } from '@angular/core' -import { MarkdownService } from '@app/core' -import { VideoChannel, VideoChannelService } from '@app/shared/shared-main' - -@Component({ - selector: 'my-video-channel-about', - templateUrl: './video-channel-about.component.html', - styleUrls: [ './video-channel-about.component.scss' ] -}) -export class VideoChannelAboutComponent implements OnInit, OnDestroy { - videoChannel: VideoChannel - descriptionHTML = '' - supportHTML = '' - - private videoChannelSub: Subscription - - constructor ( - private videoChannelService: VideoChannelService, - private markdownService: MarkdownService - ) { } - - ngOnInit () { - // Parent get the video channel for us - this.videoChannelSub = this.videoChannelService.videoChannelLoaded - .subscribe(async videoChannel => { - this.videoChannel = videoChannel - - this.descriptionHTML = await this.markdownService.textMarkdownToHTML(this.videoChannel.description) - this.supportHTML = await this.markdownService.enhancedMarkdownToHTML(this.videoChannel.support) - }) - } - - ngOnDestroy () { - if (this.videoChannelSub) this.videoChannelSub.unsubscribe() - } - - getVideoChannelDescription () { - if (this.descriptionHTML) return this.descriptionHTML - - return $localize`No description` - } -} diff --git a/client/src/app/+video-channels/video-channels-routing.module.ts b/client/src/app/+video-channels/video-channels-routing.module.ts index f8c32f14e..fcaad8934 100644 --- a/client/src/app/+video-channels/video-channels-routing.module.ts +++ b/client/src/app/+video-channels/video-channels-routing.module.ts @@ -1,7 +1,6 @@ import { NgModule } from '@angular/core' import { RouterModule, Routes } from '@angular/router' import { MetaGuard } from '@ngx-meta/core' -import { VideoChannelAboutComponent } from './video-channel-about/video-channel-about.component' import { VideoChannelPlaylistsComponent } from './video-channel-playlists/video-channel-playlists.component' import { VideoChannelVideosComponent } from './video-channel-videos/video-channel-videos.component' import { VideoChannelsComponent } from './video-channels.component' @@ -38,15 +37,6 @@ const videoChannelsRoutes: Routes = [ title: $localize`Video channel playlists` } } - }, - { - path: 'about', - component: VideoChannelAboutComponent, - data: { - meta: { - title: $localize`About video channel` - } - } } ] } diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html index b3ea19768..f63110bf5 100644 --- a/client/src/app/+video-channels/video-channels.component.html +++ b/client/src/app/+video-channels/video-channels.component.html @@ -1,50 +1,114 @@ -
-