Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Add show channel button in account page

Chocobozzzdc8902634864
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html
index e9c8179b77..cb23bb522a 100644
--- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html
+++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html
@@ -5,7 +5,7 @@
<div class="channels" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [autoInit]="true">
<div class="section channel" *ngFor="let videoChannel of videoChannels">
<div class="section-title">
- <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]" i18n-title title="See this video channel">
+ <a [routerLink]="getVideoChannelLink(videoChannel)" i18n-title title="See this video channel">
<img [src]="videoChannel.avatarUrl" alt="Avatar" />
<div>{{ videoChannel.displayName }}</div>
@@ -20,6 +20,10 @@
<my-video-miniature *ngFor="let video of getVideosOf(videoChannel)" [video]="video" [user]="user" [displayVideoActions]="false"></my-video-miniature>
</div>
+
+ <a class="show-more" i18n [routerLink]="getVideoChannelLink(videoChannel)">
+ Show this channel
+ </a>
</div>
</div>
</div>
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
index 4d07d653f9..7144f4b5f5 100644
--- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
+++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
@@ -89,4 +89,8 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy {
this.loadMoreChannels()
}
+
+ getVideoChannelLink (videoChannel: VideoChannel) {
+ return [ '/video-channels', videoChannel.nameWithHost ]
+ }
}
diff --git a/client/src/app/shared/video/video-miniature.component.scss b/client/src/app/shared/video/video-miniature.component.scss
index dac178bdef..3658ee3c00 100644
--- a/client/src/app/shared/video/video-miniature.component.scss
+++ b/client/src/app/shared/video/video-miniature.component.scss
@@ -9,7 +9,7 @@ $more-margin-right: 10px;
width: $video-miniature-width;
display: inline-flex;
flex-direction: column;
- margin-bottom: 30px;
+ margin-bottom: $video-miniature-margin-bottom;
height: 195px;
vertical-align: top;
diff --git a/client/src/sass/include/_miniature.scss b/client/src/sass/include/_miniature.scss
index 26c327956d..e4ed88d31d 100644
--- a/client/src/sass/include/_miniature.scss
+++ b/client/src/sass/include/_miniature.scss
@@ -142,10 +142,13 @@ $play-overlay-width: 18px;
@mixin miniature-rows {
max-height: 540px; // 2 rows max
overflow: hidden;
- padding-top: 10px;
&:first-child {
padding-top: 30px;
+
+ .section-title {
+ border-top: none !important;
+ }
}
my-video-miniature {
@@ -155,9 +158,11 @@ $play-overlay-width: 18px;
.section-title {
font-size: 24px;
font-weight: $font-semibold;
- margin-bottom: 30px;
+ padding-top: 15px;
+ margin-bottom: 15px;
display: flex;
justify-content: space-between;
+ border-top: 1px solid $separator-border-color;
a {
&:hover, &:focus:not(.focus-visible), &:active {
@@ -194,6 +199,17 @@ $play-overlay-width: 18px;
}
}
+ .show-more {
+ position: relative;
+ top: -5px;
+ display: inline-block;
+ font-size: 16px;
+ text-transform: uppercase;
+ color: $grey-foreground-color;
+ margin-bottom: 10px;
+ font-weight: $font-semibold;
+ }
+
@media screen and (max-width: $mobile-view) {
max-height: initial;
overflow: initial;
diff --git a/client/src/sass/include/_variables.scss b/client/src/sass/include/_variables.scss
index aafeda2577..f629dc23ef 100644
--- a/client/src/sass/include/_variables.scss
+++ b/client/src/sass/include/_variables.scss
@@ -47,6 +47,7 @@ $footer-border-color: $header-border-color;
$separator-border-color: rgba(0, 0, 0, 0.10);
$video-miniature-width: 238px;
+$video-miniature-margin-bottom: 30px;
$video-thumbnail-height: 122px;
$video-thumbnail-width: 223px;
$video-thumbnail-ratio: $video-thumbnail-width / $video-thumbnail-height;