aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-29 09:30:06 +0100
committerChocobozzz <me@florianbigard.com>2018-01-29 09:30:06 +0100
commitc88593f72f1097cc34a091b4cb4b6d6e214d1e9f (patch)
tree23c78f45ac3029bf8e3cf224f1f8cf9e27a3e944 /client/src/app/shared/video
parente8395f027b6c3e3f757c740e35b20e76c51b03bd (diff)
downloadPeerTube-c88593f72f1097cc34a091b4cb4b6d6e214d1e9f.tar.gz
PeerTube-c88593f72f1097cc34a091b4cb4b6d6e214d1e9f.tar.zst
PeerTube-c88593f72f1097cc34a091b4cb4b6d6e214d1e9f.zip
Fix search pagination
Diffstat (limited to 'client/src/app/shared/video')
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index 354373776..aaf376c81 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -10,7 +10,7 @@ import { Video } from './video.model'
10export abstract class AbstractVideoList implements OnInit { 10export abstract class AbstractVideoList implements OnInit {
11 pagination: ComponentPagination = { 11 pagination: ComponentPagination = {
12 currentPage: 1, 12 currentPage: 1,
13 itemsPerPage: 25, 13 itemsPerPage: 10,
14 totalItems: null 14 totalItems: null
15 } 15 }
16 sort: SortField = '-createdAt' 16 sort: SortField = '-createdAt'
@@ -26,6 +26,9 @@ export abstract class AbstractVideoList implements OnInit {
26 protected abstract currentRoute: string 26 protected abstract currentRoute: string
27 27
28 abstract titlePage: string 28 abstract titlePage: string
29
30 protected otherParams = {}
31
29 private loadedPages: { [ id: number ]: boolean } = {} 32 private loadedPages: { [ id: number ]: boolean } = {}
30 33
31 abstract getVideosObservable (): Observable<{ videos: Video[], totalVideos: number}> 34 abstract getVideosObservable (): Observable<{ videos: Video[], totalVideos: number}>
@@ -119,7 +122,7 @@ export abstract class AbstractVideoList implements OnInit {
119 page: this.pagination.currentPage 122 page: this.pagination.currentPage
120 } 123 }
121 124
122 return params 125 return Object.assign(params, this.otherParams)
123 } 126 }
124 127
125 protected loadRouteParams (routeParams: { [ key: string ]: any }) { 128 protected loadRouteParams (routeParams: { [ key: string ]: any }) {