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'
})
export class VideoChannelsComponent implements OnInit, OnDestroy {
@ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent
+ @ViewChild('supportModal') supportModal: SupportModalComponent
videoChannel: VideoChannel
hotkeys: Hotkey[]
this.links = [
{ label: $localize`VIDEOS`, routerLink: 'videos' },
- { label: $localize`VIDEO PLAYLISTS`, routerLink: 'video-playlists' }
+ { label: $localize`PLAYLISTS`, routerLink: 'video-playlists' }
]
}
isManageable () {
if (!this.isUserLoggedIn()) return false
- return this.videoChannel.ownerAccount.userId === this.authService.getUser().id
+ return this.videoChannel?.ownerAccount.userId === this.authService.getUser().id
}
activateCopiedMessage () {
this.notifier.success($localize`Username copied`)
}
+ hasShowMoreDescription () {
+ return !this.channelDescriptionExpanded && this.channelDescriptionHTML.length > 100
+ }
+
+ showSupportModal () {
+ this.supportModal.show()
+ }
+
+ getAccountUrl () {
+ return [ '/accounts', this.videoChannel.ownerBy ]
+ }
+
private loadChannelVideosCount () {
this.videoService.getVideoChannelVideos({
videoChannel: this.videoChannel,