Skip to content

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

Better discover page navigation

Chocobozzz1a9ef4ceaab1
diff --git a/client/src/app/+video-list/overview/video-overview.component.html b/client/src/app/+video-list/overview/video-overview.component.html
index be7508da85..2f068cf3b0 100644
--- a/client/src/app/+video-list/overview/video-overview.component.html
+++ b/client/src/app/+video-list/overview/video-overview.component.html
@@ -20,25 +20,27 @@
myInfiniteScroller (nearOfBottom)="onNearOfBottom()"
[dataObservable]="onDataSubject.asObservable()"
>
- <div class="section videos" *ngFor="let object of objects">
-
- <div class="section-header d-flex flex-wrap justify-content-between align-items-start mb-3">
- <h1 class="section-title">
- <my-actor-avatar *ngIf="object.channel" size="40px" actorType="channel" [actor]="object.channel"></my-actor-avatar>
-
- <a class="text-fg border-highlight text-decoration-none" routerLink="/search" [queryParams]="object.queryParams">{{ object.label }}</a>
-
- <span class="fg-100 fs-7 mx-2">·</span>
- <span i18n class="fg-100 fs-7">{{ object.type }}</span>
- </h1>
+ @for (object of objects; track object) {
+ <div class="section videos">
+ <div class="section-header d-flex flex-wrap justify-content-between align-items-start mb-3">
+ <h1 class="section-title">
+ <my-actor-avatar *ngIf="object.channel" size="40px" actorType="channel" [actor]="object.channel"></my-actor-avatar>
+
+ <span class="text-fg border-highlight text-decoration-none">{{ object.label }}</span>
+
+ <span class="fg-100 fs-7 mx-2">·</span>
+ <span i18n class="fg-100 fs-7">{{ object.type }}</span>
+ </h1>
+ </div>
+
+ <div class="video-wrapper" *ngFor="let video of object.videos">
+ <my-video-miniature [video]="video" [user]="userMiniature" [displayVideoActions]="true"></my-video-miniature>
+ </div>
</div>
- <div class="video-wrapper" *ngFor="let video of object.videos">
- <my-video-miniature [video]="video" [user]="userMiniature" [displayVideoActions]="true"></my-video-miniature>
+ <div class="text-center">
+ <my-button class="mt-3 mb-3" theme="secondary" [routerLink]="object.routerLink" [queryParams]="object.queryParams">{{ object.buttonLabel }}</my-button>
</div>
-
- <my-button class="ms-2 d-none-mw" theme="secondary" [routerLink]="object.routerLink" [queryParams]="object.queryParams">{{ object.buttonLabel }}</my-button>
-
- </div>
+ }
</div>
}
diff --git a/client/src/app/+video-list/overview/video-overview.component.scss b/client/src/app/+video-list/overview/video-overview.component.scss
index 3700a00761..a5366d32c9 100644
--- a/client/src/app/+video-list/overview/video-overview.component.scss
+++ b/client/src/app/+video-list/overview/video-overview.component.scss
@@ -1,8 +1,9 @@
-@use '_variables' as *;
-@use '_mixins' as *;
-@use '_miniature' as *;
+@use "_variables" as *;
+@use "_mixins" as *;
+@use "_miniature" as *;
-.section-header {
+.section-header,
+my-button {
// make the element span a full grid row within .videos grid
grid-column: 1 / -1;
}
@@ -10,7 +11,7 @@
.section-title,
.section-header {
display: flex;
- align-items: center
+ align-items: center;
}
.section-title {
@@ -30,7 +31,6 @@
}
.quick-access-links {
-
a {
color: pvar(--fg-300);
text-decoration: underline;
diff --git a/client/src/app/+video-list/overview/video-overview.component.ts b/client/src/app/+video-list/overview/video-overview.component.ts
index 849c3bdffb..4197c6a5bb 100644
--- a/client/src/app/+video-list/overview/video-overview.component.ts
+++ b/client/src/app/+video-list/overview/video-overview.component.ts
@@ -1,7 +1,7 @@
import { CommonModule } from '@angular/common'
import { AfterViewChecked, ChangeDetectorRef, Component, ElementRef, OnDestroy, OnInit, inject, viewChild } from '@angular/core'
import { RouterLink } from '@angular/router'
-import { DisableForReuseHook, Notifier, User, UserService } from '@app/core'
+import { DisableForReuseHook, Notifier, ServerService, User, UserService } from '@app/core'
import { ActorAvatarComponent, ActorAvatarInput } from '@app/shared/shared-actor-image/actor-avatar.component'
import { ButtonComponent } from '@app/shared/shared-main/buttons/button.component'
import { InfiniteScrollerDirective } from '@app/shared/shared-main/common/infinite-scroller.directive'
@@ -28,6 +28,7 @@ export class VideoOverviewComponent implements OnInit, OnDestroy, AfterViewCheck
private userService = inject(UserService)
private overviewService = inject(OverviewService)
private cd = inject(ChangeDetectorRef)
+ private server = inject(ServerService)
readonly quickAccessContent = viewChild<ElementRef>('quickAccessContent')
@@ -155,9 +156,13 @@ export class VideoOverviewComponent implements OnInit, OnDestroy, AfterViewCheck
}
for (const value of overview.channels) {
+ const channelName = this.server.getHTMLConfig().client.videos.miniature.preferAuthorDisplayName
+ ? value.videos[0].channel.displayName
+ : value.videos[0].byVideoChannel
+
this.objects.push({
- buttonLabel: $localize`View the channel`,
- label: value.videos[0].byVideoChannel,
+ buttonLabel: $localize`Browse ${channelName} channel`,
+ label: channelName,
routerLink: [ '/c', value.videos[0].byVideoChannel ],
queryParams: {},
videos: value.videos,