aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/misc/channels-setup-message.component.ts
diff options
context:
space:
mode:
authorMs Kimsible <1877318+kimsible@users.noreply.github.com>2021-08-26 08:22:33 +0200
committerGitHub <noreply@github.com>2021-08-26 08:22:33 +0200
commit7dca45f99db58d9bb3423a3765aaee68c69bc9f2 (patch)
tree6bdf45c304a58dca51a8e856a8d35238e7bc9bbb /client/src/app/shared/shared-main/misc/channels-setup-message.component.ts
parent8729a87024fc837f7dd6f13afeec90cf6dda1c06 (diff)
downloadPeerTube-7dca45f99db58d9bb3423a3765aaee68c69bc9f2.tar.gz
PeerTube-7dca45f99db58d9bb3423a3765aaee68c69bc9f2.tar.zst
PeerTube-7dca45f99db58d9bb3423a3765aaee68c69bc9f2.zip
Inform user to fill account profile and channels (#4352)
* Add account-setup modal when login * Add channels-setup alert into my-channels, my-playlists and upload page Co-authored-by: Ms Kimsible <kimsible@users.noreply.github.com>
Diffstat (limited to 'client/src/app/shared/shared-main/misc/channels-setup-message.component.ts')
-rw-r--r--client/src/app/shared/shared-main/misc/channels-setup-message.component.ts32
1 files changed, 32 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-main/misc/channels-setup-message.component.ts b/client/src/app/shared/shared-main/misc/channels-setup-message.component.ts
new file mode 100644
index 000000000..50b98841a
--- /dev/null
+++ b/client/src/app/shared/shared-main/misc/channels-setup-message.component.ts
@@ -0,0 +1,32 @@
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}