diff options
Diffstat (limited to 'client/src/app/shared/shared-main/misc')
4 files changed, 73 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-main/misc/channels-setup-message.component.html b/client/src/app/shared/shared-main/misc/channels-setup-message.component.html new file mode 100644 index 000000000..3f94fa04c --- /dev/null +++ b/client/src/app/shared/shared-main/misc/channels-setup-message.component.html | |||
@@ -0,0 +1,8 @@ | |||
1 | <div *ngIf="hasChannelNotConfigured" class="channels-setup-message alert alert-info"> | ||
2 | <my-global-icon iconName="tip"></my-global-icon> | ||
3 | |||
4 | <div> | ||
5 | <div i18n>Some of your channels are not fully set up. Make them welcoming and explicit about what you publish by adding a <strong>banner</strong>, an <strong>avatar</strong> and a <strong>description</strong>.</div> | ||
6 | <a *ngIf="!hideLink" class="channels-settings-link" routerLink="/my-library/video-channels" i18n>Set up my channels</a> | ||
7 | </div> | ||
8 | </div> | ||
diff --git a/client/src/app/shared/shared-main/misc/channels-setup-message.component.scss b/client/src/app/shared/shared-main/misc/channels-setup-message.component.scss new file mode 100644 index 000000000..7dcba2ca5 --- /dev/null +++ b/client/src/app/shared/shared-main/misc/channels-setup-message.component.scss | |||
@@ -0,0 +1,32 @@ | |||
1 | @use '_variables' as *; | ||
2 | @use '_mixins' as *; | ||
3 | |||
4 | .channels-setup-message { | ||
5 | display: flex; | ||
6 | align-items: center; | ||
7 | justify-content: center; | ||
8 | |||
9 | my-global-icon { | ||
10 | width: 32px; | ||
11 | align-self: flex-start; | ||
12 | |||
13 | ::ng-deep { | ||
14 | svg { | ||
15 | fill: #0c5460; | ||
16 | } | ||
17 | } | ||
18 | |||
19 | + div { | ||
20 | margin-left: 10px; | ||
21 | text-align: center; | ||
22 | |||
23 | a.channels-settings-link { | ||
24 | @include peertube-button-link; | ||
25 | @include grey-button; | ||
26 | |||
27 | height: fit-content; | ||
28 | margin-top: 10px; | ||
29 | } | ||
30 | } | ||
31 | } | ||
32 | } | ||
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 @@ | |||
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 | |||
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 | } | ||
diff --git a/client/src/app/shared/shared-main/misc/index.ts b/client/src/app/shared/shared-main/misc/index.ts index dc8ef9754..24134d7cd 100644 --- a/client/src/app/shared/shared-main/misc/index.ts +++ b/client/src/app/shared/shared-main/misc/index.ts | |||
@@ -1,3 +1,4 @@ | |||
1 | export * from './channels-setup-message.component' | ||
1 | export * from './help.component' | 2 | export * from './help.component' |
2 | export * from './list-overflow.component' | 3 | export * from './list-overflow.component' |
3 | export * from './top-menu-dropdown.component' | 4 | export * from './top-menu-dropdown.component' |