]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+video-channels/video-channels.component.ts
Fix peertube container in markdown preview
[github/Chocobozzz/PeerTube.git] / client / src / app / +video-channels / video-channels.component.ts
index 4fcc4210374205fa77560ce4e75e97488bc446de..3833d9c542c03a0509020d5e3c76b6b6914e0615 100644 (file)
@@ -5,6 +5,7 @@ import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'
 import { ActivatedRoute } from '@angular/router'
 import { AuthService, MarkdownService, Notifier, RestExtractor, ScreenService } from '@app/core'
 import { ListOverflowItem, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main'
+import { SupportModalComponent } from '@app/shared/shared-support-modal'
 import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription'
 import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes'
 
@@ -14,6 +15,7 @@ import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes'
 })
 export class VideoChannelsComponent implements OnInit, OnDestroy {
   @ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent
+  @ViewChild('supportModal') supportModal: SupportModalComponent
 
   videoChannel: VideoChannel
   hotkeys: Hotkey[]
@@ -72,7 +74,7 @@ export class VideoChannelsComponent implements OnInit, OnDestroy {
 
     this.links = [
       { label: $localize`VIDEOS`, routerLink: 'videos' },
-      { label: $localize`VIDEO PLAYLISTS`, routerLink: 'video-playlists' }
+      { label: $localize`PLAYLISTS`, routerLink: 'video-playlists' }
     ]
   }
 
@@ -101,6 +103,18 @@ export class VideoChannelsComponent implements OnInit, OnDestroy {
     this.notifier.success($localize`Username copied`)
   }
 
+  hasShowMoreDescription () {
+    return !this.channelDescriptionExpanded && this.channelDescriptionHTML.length > 100
+  }
+
+  showSupportModal () {
+    this.supportModal.show()
+  }
+
+  getAccountUrl () {
+    return [ '/a', this.videoChannel.ownerBy ]
+  }
+
   private loadChannelVideosCount () {
     this.videoService.getVideoChannelVideos({
       videoChannel: this.videoChannel,