-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add channels-setup alert into my-channels, my-playlist and upload page
- Loading branch information
Showing
11 changed files
with
91 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
client/src/app/shared/shared-main/misc/channels-setup-message.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div *ngIf="hasChannelNotConfigured" class="channels-setup-message alert alert-info"> | ||
<my-global-icon iconName="tip"></my-global-icon> | ||
|
||
<div> | ||
<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> | ||
<a *ngIf="!hideLink" class="channels-settings-link" routerLink="/my-library/video-channels" i18n>Set up my channels</a> | ||
</div> | ||
</div> |
32 changes: 32 additions & 0 deletions
32
client/src/app/shared/shared-main/misc/channels-setup-message.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
@use '_variables' as *; | ||
@use '_mixins' as *; | ||
|
||
.channels-setup-message { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
|
||
my-global-icon { | ||
width: 32px; | ||
align-self: flex-start; | ||
|
||
::ng-deep { | ||
svg { | ||
fill: #0c5460; | ||
} | ||
} | ||
|
||
&+ div { | ||
margin-left: 10px; | ||
text-align: center; | ||
|
||
a.channels-settings-link { | ||
@include peertube-button-link; | ||
@include grey-button; | ||
|
||
height: fit-content; | ||
margin-top: 10px; | ||
} | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
client/src/app/shared/shared-main/misc/channels-setup-message.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Component, Input, OnInit } from '@angular/core' | ||
import { AuthService, User } from '@app/core' | ||
import { VideoChannel } from '@app/shared/shared-main' | ||
|
||
@Component({ | ||
selector: 'my-channels-setup-message', | ||
templateUrl: './channels-setup-message.component.html', | ||
styleUrls: [ './channels-setup-message.component.scss' ] | ||
}) | ||
export class ChannelsSetupMessageComponent implements OnInit { | ||
@Input() hideLink = false | ||
|
||
user: User = null | ||
|
||
constructor ( | ||
private authService: AuthService | ||
) {} | ||
|
||
get userInformationLoaded () { | ||
return this.authService.userInformationLoaded | ||
} | ||
|
||
get hasChannelNotConfigured () { | ||
return this.user.videoChannels | ||
.filter((channel: VideoChannel) => (!channel.avatar || !channel.description)) | ||
.length > 0 | ||
} | ||
|
||
ngOnInit () { | ||
this.user = this.authService.getUser() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.