X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bvideo-channels%2Fvideo-channels.component.ts;h=3833d9c542c03a0509020d5e3c76b6b6914e0615;hb=24893b524c47b8f89090192aa38126352a952808;hp=4fcc4210374205fa77560ce4e75e97488bc446de;hpb=67264e060b6068399dae9a67abae035a73b84af1;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts index 4fcc42103..3833d9c54 100644 --- a/client/src/app/+video-channels/video-channels.component.ts +++ b/client/src/app/+video-channels/video-channels.component.ts @@ -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,