]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-main/misc/channels-setup-message.component.ts
Fix broken delete buttons of admin federation lists (#4378)
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / misc / channels-setup-message.component.ts
CommitLineData
7dca45f9
MK
1import { Component, Input, OnInit } from '@angular/core'
2import { AuthService, User } from '@app/core'
3import { VideoChannel } from '@app/shared/shared-main'
4
5@Component({
6 selector: 'my-channels-setup-message',
7 templateUrl: './channels-setup-message.component.html',
8 styleUrls: [ './channels-setup-message.component.scss' ]
9})
10export class ChannelsSetupMessageComponent implements OnInit {
11 @Input() hideLink = false
12
13 user: User = null
14
15 constructor (
16 private authService: AuthService
17 ) {}
18
19 get userInformationLoaded () {
20 return this.authService.userInformationLoaded
21 }
22
23 get hasChannelNotConfigured () {
24 return this.user.videoChannels
25 .filter((channel: VideoChannel) => (!channel.avatar || !channel.description))
26 .length > 0
27 }
28
29 ngOnInit () {
30 this.user = this.authService.getUser()
31 }
32}