aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+admin/moderation/moderation.routes.ts10
-rw-r--r--client/src/app/+admin/users/user-list/user-list.component.ts3
-rw-r--r--client/src/app/menu/menu.component.ts10
-rw-r--r--client/src/app/shared/overview/overview.service.ts2
-rw-r--r--client/src/app/shared/video/abstract-video-list.html6
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts40
-rw-r--r--client/src/app/shared/video/infinite-scroller.directive.ts13
-rw-r--r--client/src/app/shared/video/video-miniature.component.html4
-rw-r--r--client/src/app/shared/video/video-miniature.component.ts11
-rw-r--r--client/src/app/videos/+video-edit/video-add-components/video-upload.component.html2
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment-add.component.scss6
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment.component.scss7
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comments.component.scss8
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.scss28
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts2
-rw-r--r--client/src/app/videos/recommendations/recent-videos-recommendation.service.ts4
-rw-r--r--client/src/app/videos/recommendations/recommended-videos.store.ts14
-rw-r--r--client/src/app/videos/video-list/video-overview.component.html2
18 files changed, 138 insertions, 34 deletions
diff --git a/client/src/app/+admin/moderation/moderation.routes.ts b/client/src/app/+admin/moderation/moderation.routes.ts
index b133152d9..6d81b9b36 100644
--- a/client/src/app/+admin/moderation/moderation.routes.ts
+++ b/client/src/app/+admin/moderation/moderation.routes.ts
@@ -16,6 +16,16 @@ export const ModerationRoutes: Routes = [
16 pathMatch: 'full' 16 pathMatch: 'full'
17 }, 17 },
18 { 18 {
19 path: 'video-abuses',
20 redirectTo: 'video-abuses/list',
21 pathMatch: 'full'
22 },
23 {
24 path: 'video-blacklist',
25 redirectTo: 'video-blacklist/list',
26 pathMatch: 'full'
27 },
28 {
19 path: 'video-abuses/list', 29 path: 'video-abuses/list',
20 component: VideoAbuseListComponent, 30 component: VideoAbuseListComponent,
21 canActivate: [ UserRightGuard ], 31 canActivate: [ UserRightGuard ],
diff --git a/client/src/app/+admin/users/user-list/user-list.component.ts b/client/src/app/+admin/users/user-list/user-list.component.ts
index 57e63d465..9697ce202 100644
--- a/client/src/app/+admin/users/user-list/user-list.component.ts
+++ b/client/src/app/+admin/users/user-list/user-list.component.ts
@@ -105,7 +105,8 @@ export class UserListComponent extends RestTable implements OnInit {
105 return 105 return
106 } 106 }
107 107
108 const res = await this.confirmService.confirm(this.i18n('Do you really want to delete this user?'), this.i18n('Delete')) 108 const message = this.i18n('If you remove this user, you will not be able to create another with the same username!')
109 const res = await this.confirmService.confirm(message, this.i18n('Delete'))
109 if (res === false) return 110 if (res === false) return
110 111
111 this.userService.removeUser(user).subscribe( 112 this.userService.removeUser(user).subscribe(
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts
index 24cd5aa28..f13ecc2c7 100644
--- a/client/src/app/menu/menu.component.ts
+++ b/client/src/app/menu/menu.component.ts
@@ -19,8 +19,10 @@ export class MenuComponent implements OnInit {
19 private routesPerRight = { 19 private routesPerRight = {
20 [UserRight.MANAGE_USERS]: '/admin/users', 20 [UserRight.MANAGE_USERS]: '/admin/users',
21 [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends', 21 [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends',
22 [UserRight.MANAGE_VIDEO_ABUSES]: '/admin/video-abuses', 22 [UserRight.MANAGE_VIDEO_ABUSES]: '/admin/moderation/video-abuses',
23 [UserRight.MANAGE_VIDEO_BLACKLIST]: '/admin/video-blacklist' 23 [UserRight.MANAGE_VIDEO_BLACKLIST]: '/admin/moderation/video-blacklist',
24 [UserRight.MANAGE_JOBS]: '/admin/jobs',
25 [UserRight.MANAGE_CONFIGURATION]: '/admin/config'
24 } 26 }
25 27
26 constructor ( 28 constructor (
@@ -67,7 +69,9 @@ export class MenuComponent implements OnInit {
67 UserRight.MANAGE_USERS, 69 UserRight.MANAGE_USERS,
68 UserRight.MANAGE_SERVER_FOLLOW, 70 UserRight.MANAGE_SERVER_FOLLOW,
69 UserRight.MANAGE_VIDEO_ABUSES, 71 UserRight.MANAGE_VIDEO_ABUSES,
70 UserRight.MANAGE_VIDEO_BLACKLIST 72 UserRight.MANAGE_VIDEO_BLACKLIST,
73 UserRight.MANAGE_JOBS,
74 UserRight.MANAGE_CONFIGURATION
71 ] 75 ]
72 76
73 for (const adminRight of adminRights) { 77 for (const adminRight of adminRights) {
diff --git a/client/src/app/shared/overview/overview.service.ts b/client/src/app/shared/overview/overview.service.ts
index 4a4714af6..097079e6d 100644
--- a/client/src/app/shared/overview/overview.service.ts
+++ b/client/src/app/shared/overview/overview.service.ts
@@ -56,6 +56,8 @@ export class OverviewService {
56 } 56 }
57 } 57 }
58 58
59 if (observables.length === 0) return of(videosOverviewResult)
60
59 return forkJoin(observables) 61 return forkJoin(observables)
60 .pipe( 62 .pipe(
61 // Translate categories 63 // Translate categories
diff --git a/client/src/app/shared/video/abstract-video-list.html b/client/src/app/shared/video/abstract-video-list.html
index 0f48b9a64..d543ab7c1 100644
--- a/client/src/app/shared/video/abstract-video-list.html
+++ b/client/src/app/shared/video/abstract-video-list.html
@@ -7,12 +7,12 @@
7 <div class="no-results" i18n *ngIf="pagination.totalItems === 0">No results.</div> 7 <div class="no-results" i18n *ngIf="pagination.totalItems === 0">No results.</div>
8 <div 8 <div
9 myInfiniteScroller 9 myInfiniteScroller
10 [pageHeight]="pageHeight" 10 [pageHeight]="pageHeight" [firstLoadedPage]="firstLoadedPage"
11 (nearOfTop)="onNearOfTop()" (nearOfBottom)="onNearOfBottom()" (pageChanged)="onPageChanged($event)" 11 (nearOfTop)="onNearOfTop()" (nearOfBottom)="onNearOfBottom()" (pageChanged)="onPageChanged($event)"
12 class="videos" #videosElement 12 class="videos" #videosElement
13 > 13 >
14 <div *ngFor="let videos of videoPages" class="videos-page"> 14 <div *ngFor="let videos of videoPages; trackBy: pageByVideoId" class="videos-page">
15 <my-video-miniature *ngFor="let video of videos" [video]="video" [user]="user" [ownerDisplayType]="ownerDisplayType"></my-video-miniature> 15 <my-video-miniature *ngFor="let video of videos; trackBy: videoById" [video]="video" [user]="user" [ownerDisplayType]="ownerDisplayType"></my-video-miniature>
16 </div> 16 </div>
17 </div> 17 </div>
18</div> 18</div>
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index b8fd7f8eb..6a758ebe0 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -36,9 +36,10 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
36 videoHeight: number 36 videoHeight: number
37 videoPages: Video[][] = [] 37 videoPages: Video[][] = []
38 ownerDisplayType: OwnerDisplayType = 'account' 38 ownerDisplayType: OwnerDisplayType = 'account'
39 firstLoadedPage: number
39 40
40 protected baseVideoWidth = 215 41 protected baseVideoWidth = 215
41 protected baseVideoHeight = 230 42 protected baseVideoHeight = 205
42 43
43 protected abstract notificationsService: NotificationsService 44 protected abstract notificationsService: NotificationsService
44 protected abstract authService: AuthService 45 protected abstract authService: AuthService
@@ -80,6 +81,15 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
80 if (this.resizeSubscription) this.resizeSubscription.unsubscribe() 81 if (this.resizeSubscription) this.resizeSubscription.unsubscribe()
81 } 82 }
82 83
84 pageByVideoId (index: number, page: Video[]) {
85 // Video are unique in all pages
86 return page[0].id
87 }
88
89 videoById (index: number, video: Video) {
90 return video.id
91 }
92
83 onNearOfTop () { 93 onNearOfTop () {
84 this.previousPage() 94 this.previousPage()
85 } 95 }
@@ -100,7 +110,11 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
100 this.loadMoreVideos(this.pagination.currentPage) 110 this.loadMoreVideos(this.pagination.currentPage)
101 } 111 }
102 112
103 loadMoreVideos (page: number) { 113 loadMoreVideos (page: number, loadOnTop = false) {
114 this.adjustVideoPageHeight()
115
116 const currentY = window.scrollY
117
104 if (this.loadedPages[page] !== undefined) return 118 if (this.loadedPages[page] !== undefined) return
105 if (this.loadingPage[page] === true) return 119 if (this.loadingPage[page] === true) return
106 120
@@ -111,6 +125,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
111 ({ videos, totalVideos }) => { 125 ({ videos, totalVideos }) => {
112 this.loadingPage[page] = false 126 this.loadingPage[page] = false
113 127
128 if (this.firstLoadedPage === undefined || this.firstLoadedPage > page) this.firstLoadedPage = page
129
114 // Paging is too high, return to the first one 130 // Paging is too high, return to the first one
115 if (this.pagination.currentPage > 1 && totalVideos <= ((this.pagination.currentPage - 1) * this.pagination.itemsPerPage)) { 131 if (this.pagination.currentPage > 1 && totalVideos <= ((this.pagination.currentPage - 1) * this.pagination.itemsPerPage)) {
116 this.pagination.currentPage = 1 132 this.pagination.currentPage = 1
@@ -125,8 +141,17 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
125 // Initialize infinite scroller now we loaded the first page 141 // Initialize infinite scroller now we loaded the first page
126 if (Object.keys(this.loadedPages).length === 1) { 142 if (Object.keys(this.loadedPages).length === 1) {
127 // Wait elements creation 143 // Wait elements creation
128 setTimeout(() => this.infiniteScroller.initialize(), 500) 144 setTimeout(() => {
145 this.infiniteScroller.initialize()
146
147 // At our first load, we did not load the first page
148 // Load the previous page so the user can move on the top (and browser previous pages)
149 if (this.pagination.currentPage > 1) this.loadMoreVideos(this.pagination.currentPage - 1, true)
150 }, 500)
129 } 151 }
152
153 // Insert elements on the top but keep the scroll in the previous position
154 if (loadOnTop) setTimeout(() => { window.scrollTo(0, currentY + this.pageHeight) }, 0)
130 }, 155 },
131 error => { 156 error => {
132 this.loadingPage[page] = false 157 this.loadingPage[page] = false
@@ -150,7 +175,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
150 const min = this.minPageLoaded() 175 const min = this.minPageLoaded()
151 176
152 if (min > 1) { 177 if (min > 1) {
153 this.loadMoreVideos(min - 1) 178 this.loadMoreVideos(min - 1, true)
154 } 179 }
155 } 180 }
156 181
@@ -189,6 +214,13 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
189 this.videoPages = Object.values(this.loadedPages) 214 this.videoPages = Object.values(this.loadedPages)
190 } 215 }
191 216
217 protected adjustVideoPageHeight () {
218 const numberOfPagesLoaded = Object.keys(this.loadedPages).length
219 if (!numberOfPagesLoaded) return
220
221 this.pageHeight = this.videosElement.nativeElement.offsetHeight / numberOfPagesLoaded
222 }
223
192 protected buildVideoHeight () { 224 protected buildVideoHeight () {
193 // Same ratios than base width/height 225 // Same ratios than base width/height
194 return this.videosElement.nativeElement.offsetWidth * (this.baseVideoHeight / this.baseVideoWidth) 226 return this.videosElement.nativeElement.offsetWidth * (this.baseVideoHeight / this.baseVideoWidth)
diff --git a/client/src/app/shared/video/infinite-scroller.directive.ts b/client/src/app/shared/video/infinite-scroller.directive.ts
index 4dc1f86e7..a02e9444a 100644
--- a/client/src/app/shared/video/infinite-scroller.directive.ts
+++ b/client/src/app/shared/video/infinite-scroller.directive.ts
@@ -6,10 +6,9 @@ import { fromEvent, Subscription } from 'rxjs'
6 selector: '[myInfiniteScroller]' 6 selector: '[myInfiniteScroller]'
7}) 7})
8export class InfiniteScrollerDirective implements OnInit, OnDestroy { 8export class InfiniteScrollerDirective implements OnInit, OnDestroy {
9 private static PAGE_VIEW_TOP_MARGIN = 500
10
11 @Input() containerHeight: number 9 @Input() containerHeight: number
12 @Input() pageHeight: number 10 @Input() pageHeight: number
11 @Input() firstLoadedPage = 1
13 @Input() percentLimit = 70 12 @Input() percentLimit = 70
14 @Input() autoInit = false 13 @Input() autoInit = false
15 14
@@ -23,6 +22,7 @@ export class InfiniteScrollerDirective implements OnInit, OnDestroy {
23 private scrollDownSub: Subscription 22 private scrollDownSub: Subscription
24 private scrollUpSub: Subscription 23 private scrollUpSub: Subscription
25 private pageChangeSub: Subscription 24 private pageChangeSub: Subscription
25 private middleScreen: number
26 26
27 constructor () { 27 constructor () {
28 this.decimalLimit = this.percentLimit / 100 28 this.decimalLimit = this.percentLimit / 100
@@ -39,6 +39,8 @@ export class InfiniteScrollerDirective implements OnInit, OnDestroy {
39 } 39 }
40 40
41 initialize () { 41 initialize () {
42 this.middleScreen = window.innerHeight / 2
43
42 // Emit the last value 44 // Emit the last value
43 const throttleOptions = { leading: true, trailing: true } 45 const throttleOptions = { leading: true, trailing: true }
44 46
@@ -92,6 +94,11 @@ export class InfiniteScrollerDirective implements OnInit, OnDestroy {
92 } 94 }
93 95
94 private calculateCurrentPage (current: number) { 96 private calculateCurrentPage (current: number) {
95 return Math.max(1, Math.round((current + InfiniteScrollerDirective.PAGE_VIEW_TOP_MARGIN) / this.pageHeight)) 97 const scrollY = current + this.middleScreen
98
99 const page = Math.max(1, Math.ceil(scrollY / this.pageHeight))
100
101 // Offset page
102 return page + (this.firstLoadedPage - 1)
96 } 103 }
97} 104}
diff --git a/client/src/app/shared/video/video-miniature.component.html b/client/src/app/shared/video/video-miniature.component.html
index 9cf3fb321..cfc483018 100644
--- a/client/src/app/shared/video/video-miniature.component.html
+++ b/client/src/app/shared/video/video-miniature.component.html
@@ -1,11 +1,11 @@
1<div class="video-miniature"> 1<div class="video-miniature">
2 <my-video-thumbnail [video]="video" [nsfw]="isVideoBlur()"></my-video-thumbnail> 2 <my-video-thumbnail [video]="video" [nsfw]="isVideoBlur"></my-video-thumbnail>
3 3
4 <div class="video-miniature-information"> 4 <div class="video-miniature-information">
5 <a 5 <a
6 tabindex="-1" 6 tabindex="-1"
7 class="video-miniature-name" 7 class="video-miniature-name"
8 [routerLink]="[ '/videos/watch', video.uuid ]" [attr.title]="video.name" [ngClass]="{ 'blur-filter': isVideoBlur() }" 8 [routerLink]="[ '/videos/watch', video.uuid ]" [attr.title]="video.name" [ngClass]="{ 'blur-filter': isVideoBlur }"
9 > 9 >
10 {{ video.name }} 10 {{ video.name }}
11 </a> 11 </a>
diff --git a/client/src/app/shared/video/video-miniature.component.ts b/client/src/app/shared/video/video-miniature.component.ts
index 07193ebd5..27098f4b4 100644
--- a/client/src/app/shared/video/video-miniature.component.ts
+++ b/client/src/app/shared/video/video-miniature.component.ts
@@ -1,4 +1,4 @@
1import { Component, Input, OnInit } from '@angular/core' 1import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core'
2import { User } from '../users' 2import { User } from '../users'
3import { Video } from './video.model' 3import { Video } from './video.model'
4import { ServerService } from '@app/core' 4import { ServerService } from '@app/core'
@@ -8,13 +8,16 @@ export type OwnerDisplayType = 'account' | 'videoChannel' | 'auto'
8@Component({ 8@Component({
9 selector: 'my-video-miniature', 9 selector: 'my-video-miniature',
10 styleUrls: [ './video-miniature.component.scss' ], 10 styleUrls: [ './video-miniature.component.scss' ],
11 templateUrl: './video-miniature.component.html' 11 templateUrl: './video-miniature.component.html',
12 changeDetection: ChangeDetectionStrategy.OnPush
12}) 13})
13export class VideoMiniatureComponent implements OnInit { 14export class VideoMiniatureComponent implements OnInit {
14 @Input() user: User 15 @Input() user: User
15 @Input() video: Video 16 @Input() video: Video
16 @Input() ownerDisplayType: OwnerDisplayType = 'account' 17 @Input() ownerDisplayType: OwnerDisplayType = 'account'
17 18
19 isVideoBlur: boolean
20
18 private ownerDisplayTypeChosen: 'account' | 'videoChannel' 21 private ownerDisplayTypeChosen: 'account' | 'videoChannel'
19 22
20 constructor (private serverService: ServerService) { } 23 constructor (private serverService: ServerService) { }
@@ -35,10 +38,8 @@ export class VideoMiniatureComponent implements OnInit {
35 } else { 38 } else {
36 this.ownerDisplayTypeChosen = 'videoChannel' 39 this.ownerDisplayTypeChosen = 'videoChannel'
37 } 40 }
38 }
39 41
40 isVideoBlur () { 42 this.isVideoBlur = this.video.isVideoNSFWForUser(this.user, this.serverService.getConfig())
41 return this.video.isVideoNSFWForUser(this.user, this.serverService.getConfig())
42 } 43 }
43 44
44 displayOwnerAccount () { 45 displayOwnerAccount () {
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html
index 8c0723155..ff0e45413 100644
--- a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html
+++ b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html
@@ -22,7 +22,7 @@
22 <div class="peertube-select-container"> 22 <div class="peertube-select-container">
23 <select id="first-step-privacy" [(ngModel)]="firstStepPrivacyId"> 23 <select id="first-step-privacy" [(ngModel)]="firstStepPrivacyId">
24 <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option> 24 <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option>
25 <option [value]="SPECIAL_SCHEDULED_PRIVACY">Scheduled</option> 25 <option i18n [value]="SPECIAL_SCHEDULED_PRIVACY">Scheduled</option>
26 </select> 26 </select>
27 </div> 27 </div>
28 </div> 28 </div>
diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.scss b/client/src/app/videos/+video-watch/comment/video-comment-add.component.scss
index a55e743fb..bb809296a 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.scss
+++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.scss
@@ -39,3 +39,9 @@ form {
39 @include orange-button 39 @include orange-button
40 } 40 }
41} 41}
42
43@media screen and (max-width: 450px) {
44 textarea, .submit-comment button {
45 font-size: 14px !important;
46 }
47} \ No newline at end of file
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.component.scss b/client/src/app/videos/+video-watch/comment/video-comment.component.scss
index f331fab80..84da5727e 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment.component.scss
+++ b/client/src/app/videos/+video-watch/comment/video-comment.component.scss
@@ -35,6 +35,7 @@
35 .comment-account { 35 .comment-account {
36 @include disable-default-a-behaviour; 36 @include disable-default-a-behaviour;
37 37
38 word-break: break-all;
38 color: var(--mainForegroundColor); 39 color: var(--mainForegroundColor);
39 font-weight: $font-bold; 40 font-weight: $font-bold;
40 } 41 }
@@ -102,3 +103,9 @@
102 img { margin-right: 10px; } 103 img { margin-right: 10px; }
103 } 104 }
104} 105}
106
107@media screen and (max-width: 450px) {
108 .root-comment {
109 font-size: 14px;
110 }
111} \ No newline at end of file
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.scss b/client/src/app/videos/+video-watch/comment/video-comments.component.scss
index d5af929d7..04518e079 100644
--- a/client/src/app/videos/+video-watch/comment/video-comments.component.scss
+++ b/client/src/app/videos/+video-watch/comment/video-comments.component.scss
@@ -31,4 +31,10 @@ my-help {
31 .view-replies { 31 .view-replies {
32 margin-left: 46px; 32 margin-left: 46px;
33 } 33 }
34} \ No newline at end of file 34}
35
36@media screen and (max-width: 450px) {
37 .view-replies {
38 font-size: 14px;
39 }
40}
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss
index fac4bdbe5..eb63cbde7 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.scss
+++ b/client/src/app/videos/+video-watch/video-watch.component.scss
@@ -81,6 +81,7 @@
81 flex-grow: 1; 81 flex-grow: 1;
82 // Set min width for flex item 82 // Set min width for flex item
83 min-width: 1px; 83 min-width: 1px;
84 max-width: 100%;
84 85
85 .video-info-first-row { 86 .video-info-first-row {
86 display: flex; 87 display: flex;
@@ -472,6 +473,7 @@ my-video-comments {
472 margin: 20px 0 0 0; 473 margin: 20px 0 0 0;
473 474
474 .video-info { 475 .video-info {
476 padding: 0;
475 477
476 .video-info-first-row { 478 .video-info-first-row {
477 479
@@ -484,6 +486,8 @@ my-video-comments {
484 } 486 }
485 487
486 /deep/ .other-videos { 488 /deep/ .other-videos {
489 padding-left: 0 !important;
490
487 /deep/ .video-miniature { 491 /deep/ .video-miniature {
488 flex-direction: column; 492 flex-direction: column;
489 } 493 }
@@ -499,7 +503,27 @@ my-video-comments {
499} 503}
500 504
501@media screen and (max-width: 450px) { 505@media screen and (max-width: 450px) {
502 .video-bottom .action-button .icon-text { 506 .video-bottom {
503 display: none !important; 507 .action-button .icon-text {
508 display: none !important;
509 }
510
511 .video-info .video-info-first-row {
512 .video-info-name {
513 font-size: 18px;
514 }
515
516 .video-info-date-views {
517 font-size: 14px;
518 }
519
520 .video-actions-rates {
521 margin-top: 10px;
522 }
523 }
524
525 .video-info-description {
526 font-size: 14px !important;
527 }
504 } 528 }
505} 529}
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts
index 834428fa4..7a61e355a 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -1,4 +1,4 @@
1import { catchError, subscribeOn } from 'rxjs/operators' 1import { catchError } from 'rxjs/operators'
2import { ChangeDetectorRef, Component, ElementRef, Inject, LOCALE_ID, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core' 2import { ChangeDetectorRef, Component, ElementRef, Inject, LOCALE_ID, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core'
3import { ActivatedRoute, Router } from '@angular/router' 3import { ActivatedRoute, Router } from '@angular/router'
4import { RedirectService } from '@app/core/routing/redirect.service' 4import { RedirectService } from '@app/core/routing/redirect.service'
diff --git a/client/src/app/videos/recommendations/recent-videos-recommendation.service.ts b/client/src/app/videos/recommendations/recent-videos-recommendation.service.ts
index 4723f7fd0..0ee34b9cb 100644
--- a/client/src/app/videos/recommendations/recent-videos-recommendation.service.ts
+++ b/client/src/app/videos/recommendations/recent-videos-recommendation.service.ts
@@ -25,8 +25,8 @@ export class RecentVideosRecommendationService implements RecommendationService
25 getRecommendations (recommendation: RecommendationInfo): Observable<Video[]> { 25 getRecommendations (recommendation: RecommendationInfo): Observable<Video[]> {
26 return this.fetchPage(1, recommendation) 26 return this.fetchPage(1, recommendation)
27 .pipe( 27 .pipe(
28 map(vids => { 28 map(videos => {
29 const otherVideos = vids.filter(v => v.uuid !== recommendation.uuid) 29 const otherVideos = videos.filter(v => v.uuid !== recommendation.uuid)
30 return otherVideos.slice(0, this.pageSize) 30 return otherVideos.slice(0, this.pageSize)
31 }) 31 })
32 ) 32 )
diff --git a/client/src/app/videos/recommendations/recommended-videos.store.ts b/client/src/app/videos/recommendations/recommended-videos.store.ts
index eb5c9867f..858ec3a27 100644
--- a/client/src/app/videos/recommendations/recommended-videos.store.ts
+++ b/client/src/app/videos/recommendations/recommended-videos.store.ts
@@ -3,8 +3,8 @@ import { Observable, ReplaySubject } from 'rxjs'
3import { Video } from '@app/shared/video/video.model' 3import { Video } from '@app/shared/video/video.model'
4import { RecommendationInfo } from '@app/shared/video/recommendation-info.model' 4import { RecommendationInfo } from '@app/shared/video/recommendation-info.model'
5import { RecentVideosRecommendationService } from '@app/videos/recommendations/recent-videos-recommendation.service' 5import { RecentVideosRecommendationService } from '@app/videos/recommendations/recent-videos-recommendation.service'
6import { RecommendationService, UUID } from '@app/videos/recommendations/recommendations.service' 6import { RecommendationService } from '@app/videos/recommendations/recommendations.service'
7import { map, switchMap, take } from 'rxjs/operators' 7import { map, shareReplay, switchMap, take } from 'rxjs/operators'
8 8
9/** 9/**
10 * This store is intended to provide data for the RecommendedVideosComponent. 10 * This store is intended to provide data for the RecommendedVideosComponent.
@@ -19,9 +19,13 @@ export class RecommendedVideosStore {
19 @Inject(RecentVideosRecommendationService) private recommendations: RecommendationService 19 @Inject(RecentVideosRecommendationService) private recommendations: RecommendationService
20 ) { 20 ) {
21 this.recommendations$ = this.requestsForLoad$$.pipe( 21 this.recommendations$ = this.requestsForLoad$$.pipe(
22 switchMap(requestedRecommendation => recommendations.getRecommendations(requestedRecommendation) 22 switchMap(requestedRecommendation => {
23 .pipe(take(1)) 23 return recommendations.getRecommendations(requestedRecommendation)
24 )) 24 .pipe(take(1))
25 }),
26 shareReplay()
27 )
28
25 this.hasRecommendations$ = this.recommendations$.pipe( 29 this.hasRecommendations$ = this.recommendations$.pipe(
26 map(otherVideos => otherVideos.length > 0) 30 map(otherVideos => otherVideos.length > 0)
27 ) 31 )
diff --git a/client/src/app/videos/video-list/video-overview.component.html b/client/src/app/videos/video-list/video-overview.component.html
index 4150cd5e1..4dad6a6e4 100644
--- a/client/src/app/videos/video-list/video-overview.component.html
+++ b/client/src/app/videos/video-list/video-overview.component.html
@@ -12,7 +12,7 @@
12 12
13 <div class="section" *ngFor="let object of overview.tags"> 13 <div class="section" *ngFor="let object of overview.tags">
14 <div class="section-title" i18n> 14 <div class="section-title" i18n>
15 <a routerLink="/search" [queryParams]="{ tagOneOf: [ object.tag ] }">{{ object.tag }}</a> 15 <a routerLink="/search" [queryParams]="{ tagsOneOf: [ object.tag ] }">{{ object.tag }}</a>
16 </div> 16 </div>
17 17
18 <my-video-miniature *ngFor="let video of object.videos" [video]="video" [user]="user"></my-video-miniature> 18 <my-video-miniature *ngFor="let video of object.videos" [video]="video" [user]="user"></my-video-miniature>