]>
Commit | Line | Data |
---|---|---|
7dca45f9 MK |
1 | import { Component, Input, OnInit } from '@angular/core' |
2 | import { AuthService, User } from '@app/core' | |
3 | import { 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 | }) | |
10 | export class ChannelsSetupMessageComponent implements OnInit { | |
11 | @Input() hideLink = false | |
12 | ||
13 | user: User = null | |
14 | ||
15 | constructor ( | |
16 | private authService: AuthService | |
17 | ) {} | |
18 | ||
9e8a7e08 C |
19 | hasChannelNotConfigured () { |
20 | if (!this.user.videoChannels) return false | |
4546d92e | 21 | |
d0800f76 | 22 | return this.user.videoChannels.filter((channel: VideoChannel) => (channel.avatars.length === 0 || !channel.description)).length > 0 |
7dca45f9 MK |
23 | } |
24 | ||
25 | ngOnInit () { | |
26 | this.user = this.authService.getUser() | |
27 | } | |
28 | } |