diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-27 17:49:18 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-27 17:49:18 +0200 |
commit | 4fd8aa327004b27530fd96bdde5df60e6745a1f6 (patch) | |
tree | e3b21282c641d50ea62e227c6ce3e7e740fec860 /client/app/videos/video-list/video-list.component.ts | |
parent | ccf6ed16f1eeb05b77103bd44bc06ccbbbba9bdd (diff) | |
download | PeerTube-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.ts | 13 |
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 | ||
25 | export class VideoListComponent implements OnInit { | 25 | export 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]); |