aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/app/videos/video-list/video-list.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-27 17:49:18 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-27 17:49:18 +0200
commit4fd8aa327004b27530fd96bdde5df60e6745a1f6 (patch)
treee3b21282c641d50ea62e227c6ce3e7e740fec860 /client/app/videos/video-list/video-list.component.ts
parentccf6ed16f1eeb05b77103bd44bc06ccbbbba9bdd (diff)
downloadPeerTube-4fd8aa327004b27530fd96bdde5df60e6745a1f6.tar.gz
PeerTube-4fd8aa327004b27530fd96bdde5df60e6745a1f6.tar.zst
PeerTube-4fd8aa327004b27530fd96bdde5df60e6745a1f6.zip
Alphabetical
Diffstat (limited to 'client/app/videos/video-list/video-list.component.ts')
-rw-r--r--client/app/videos/video-list/video-list.component.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/client/app/videos/video-list/video-list.component.ts b/client/app/videos/video-list/video-list.component.ts
index 3f54c98ce..23b97df32 100644
--- a/client/app/videos/video-list/video-list.component.ts
+++ b/client/app/videos/video-list/video-list.component.ts
@@ -23,23 +23,23 @@ import { VideoSortComponent } from './video-sort.component';
23}) 23})
24 24
25export class VideoListComponent implements OnInit { 25export class VideoListComponent implements OnInit {
26 user: User = null; 26 loading = false;
27 videos: Video[] = [];
28 pagination: Pagination = { 27 pagination: Pagination = {
29 currentPage: 1, 28 currentPage: 1,
30 itemsPerPage: 9, 29 itemsPerPage: 9,
31 total: 0 30 total: 0
32 }; 31 };
33 sort: SortField; 32 sort: SortField;
34 loading = false; 33 user: User = null;
34 videos: Video[] = [];
35 35
36 private search: Search; 36 private search: Search;
37 37
38 constructor( 38 constructor(
39 private authService: AuthService, 39 private authService: AuthService,
40 private videoService: VideoService, 40 private router: Router,
41 private routeParams: RouteParams, 41 private routeParams: RouteParams,
42 private router: Router 42 private videoService: VideoService
43 ) { 43 ) {
44 this.search = { 44 this.search = {
45 value: this.routeParams.get('search'), 45 value: this.routeParams.get('search'),
@@ -73,6 +73,7 @@ export class VideoListComponent implements OnInit {
73 ({ videos, totalVideos }) => { 73 ({ videos, totalVideos }) => {
74 this.videos = videos; 74 this.videos = videos;
75 this.pagination.total = totalVideos; 75 this.pagination.total = totalVideos;
76
76 this.loading = false; 77 this.loading = false;
77 }, 78 },
78 error => alert(error) 79 error => alert(error)
@@ -91,8 +92,8 @@ export class VideoListComponent implements OnInit {
91 }; 92 };
92 93
93 if (this.search.value) { 94 if (this.search.value) {
94 params.search = this.search.value;
95 params.field = this.search.field; 95 params.field = this.search.field;
96 params.search = this.search.value;
96 } 97 }
97 98
98 this.router.navigate(['VideosList', params]); 99 this.router.navigate(['VideosList', params]);