]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/search/search-filters.component.ts
Add zh-Hans-CN to client.sh
[github/Chocobozzz/PeerTube.git] / client / src / app / search / search-filters.component.ts
index 4219f99a9642dcfdeaaf86b025ab6cb1fc2ed6d7..8d7f84ac1ba5758b5294ddd2a995c45d5fe7fc0d 100644 (file)
@@ -18,11 +18,12 @@ export class SearchFiltersComponent implements OnInit {
 
   @Output() filtered = new EventEmitter<AdvancedSearch>()
 
-  videoCategories: VideoConstant<string>[] = []
-  videoLicences: VideoConstant<string>[] = []
+  videoCategories: VideoConstant<number>[] = []
+  videoLicences: VideoConstant<number>[] = []
   videoLanguages: VideoConstant<string>[] = []
 
   publishedDateRanges: { id: string, label: string }[] = []
+  sorts: { id: string, label: string }[] = []
   durationRanges: { id: string, label: string }[] = []
 
   publishedDateRange: string
@@ -30,11 +31,6 @@ export class SearchFiltersComponent implements OnInit {
 
   constructor (
     private i18n: I18n,
-    private route: ActivatedRoute,
-    private metaService: MetaService,
-    private redirectService: RedirectService,
-    private notificationsService: NotificationsService,
-    private searchService: SearchService,
     private serverService: ServerService
   ) {
     this.publishedDateRanges = [
@@ -59,15 +55,30 @@ export class SearchFiltersComponent implements OnInit {
     this.durationRanges = [
       {
         id: 'short',
-        label: this.i18n('Short (< 4 minutes)')
+        label: this.i18n('Short (< 4 min)')
       },
       {
         id: 'long',
-        label: this.i18n('Long (> 10 minutes)')
+        label: this.i18n('Long (> 10 min)')
       },
       {
         id: 'medium',
-        label: this.i18n('Medium (4-10 minutes)')
+        label: this.i18n('Medium (4-10 min)')
+      }
+    ]
+
+    this.sorts = [
+      {
+        id: '-match',
+        label: this.i18n('Relevance')
+      },
+      {
+        id: '-publishedAt',
+        label: this.i18n('Publish date')
+      },
+      {
+        id: '-views',
+        label: this.i18n('Views')
       }
     ]
   }