aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/angular/videos/components/list/videos-list.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-24 23:00:58 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-24 23:00:58 +0200
commita99593ed9f3244e75f7db793ba6716754d664573 (patch)
treed17a2b5cda09bc0ec51ec102ec853e6584f3901a /client/angular/videos/components/list/videos-list.component.ts
parentaff038cd784ab09a9f62b2e81816110e100ba7b8 (diff)
downloadPeerTube-a99593ed9f3244e75f7db793ba6716754d664573.tar.gz
PeerTube-a99593ed9f3244e75f7db793ba6716754d664573.tar.zst
PeerTube-a99593ed9f3244e75f7db793ba6716754d664573.zip
Make the sort/results bar less ugly
Diffstat (limited to 'client/angular/videos/components/list/videos-list.component.ts')
-rw-r--r--client/angular/videos/components/list/videos-list.component.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/client/angular/videos/components/list/videos-list.component.ts b/client/angular/videos/components/list/videos-list.component.ts
index db64a856e..94b064e16 100644
--- a/client/angular/videos/components/list/videos-list.component.ts
+++ b/client/angular/videos/components/list/videos-list.component.ts
@@ -78,7 +78,17 @@ export class VideosListComponent implements OnInit {
78 78
79 onSort(sort: SortField) { 79 onSort(sort: SortField) {
80 this.sort = sort; 80 this.sort = sort;
81 this._router.navigate(['VideosList', { sort: this.sort }]); 81
82 const params: any = {
83 sort: this.sort
84 };
85
86 if (this.search.value) {
87 params.search = this.search.value;
88 params.field = this.search.field;
89 }
90
91 this._router.navigate(['VideosList', params]);
82 this.getVideos(); 92 this.getVideos();
83 } 93 }
84} 94}