diff options
Diffstat (limited to 'client/src/app/+search/search-filters.component.ts')
-rw-r--r-- | client/src/app/+search/search-filters.component.ts | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/client/src/app/+search/search-filters.component.ts b/client/src/app/+search/search-filters.component.ts index 13ad61647..a2af9a942 100644 --- a/client/src/app/+search/search-filters.component.ts +++ b/client/src/app/+search/search-filters.component.ts | |||
@@ -1,8 +1,6 @@ | |||
1 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 1 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
2 | import { ServerService } from '@app/core' | 2 | import { ServerService } from '@app/core' |
3 | import { VideoValidatorsService } from '@app/shared/shared-forms' | ||
4 | import { AdvancedSearch } from '@app/shared/shared-search' | 3 | import { AdvancedSearch } from '@app/shared/shared-search' |
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
6 | import { ServerConfig, VideoConstant } from '@shared/models' | 4 | import { ServerConfig, VideoConstant } from '@shared/models' |
7 | 5 | ||
8 | @Component({ | 6 | @Component({ |
@@ -32,64 +30,62 @@ export class SearchFiltersComponent implements OnInit { | |||
32 | private serverConfig: ServerConfig | 30 | private serverConfig: ServerConfig |
33 | 31 | ||
34 | constructor ( | 32 | constructor ( |
35 | private i18n: I18n, | ||
36 | private videoValidatorsService: VideoValidatorsService, | ||
37 | private serverService: ServerService | 33 | private serverService: ServerService |
38 | ) { | 34 | ) { |
39 | this.publishedDateRanges = [ | 35 | this.publishedDateRanges = [ |
40 | { | 36 | { |
41 | id: 'any_published_date', | 37 | id: 'any_published_date', |
42 | label: this.i18n('Any') | 38 | label: $localize`Any` |
43 | }, | 39 | }, |
44 | { | 40 | { |
45 | id: 'today', | 41 | id: 'today', |
46 | label: this.i18n('Today') | 42 | label: $localize`Today` |
47 | }, | 43 | }, |
48 | { | 44 | { |
49 | id: 'last_7days', | 45 | id: 'last_7days', |
50 | label: this.i18n('Last 7 days') | 46 | label: $localize`Last 7 days` |
51 | }, | 47 | }, |
52 | { | 48 | { |
53 | id: 'last_30days', | 49 | id: 'last_30days', |
54 | label: this.i18n('Last 30 days') | 50 | label: $localize`Last 30 days` |
55 | }, | 51 | }, |
56 | { | 52 | { |
57 | id: 'last_365days', | 53 | id: 'last_365days', |
58 | label: this.i18n('Last 365 days') | 54 | label: $localize`Last 365 days` |
59 | } | 55 | } |
60 | ] | 56 | ] |
61 | 57 | ||
62 | this.durationRanges = [ | 58 | this.durationRanges = [ |
63 | { | 59 | { |
64 | id: 'any_duration', | 60 | id: 'any_duration', |
65 | label: this.i18n('Any') | 61 | label: $localize`Any` |
66 | }, | 62 | }, |
67 | { | 63 | { |
68 | id: 'short', | 64 | id: 'short', |
69 | label: this.i18n('Short (< 4 min)') | 65 | label: $localize`Short (< 4 min)` |
70 | }, | 66 | }, |
71 | { | 67 | { |
72 | id: 'medium', | 68 | id: 'medium', |
73 | label: this.i18n('Medium (4-10 min)') | 69 | label: $localize`Medium (4-10 min)` |
74 | }, | 70 | }, |
75 | { | 71 | { |
76 | id: 'long', | 72 | id: 'long', |
77 | label: this.i18n('Long (> 10 min)') | 73 | label: $localize`Long (> 10 min)` |
78 | } | 74 | } |
79 | ] | 75 | ] |
80 | 76 | ||
81 | this.sorts = [ | 77 | this.sorts = [ |
82 | { | 78 | { |
83 | id: '-match', | 79 | id: '-match', |
84 | label: this.i18n('Relevance') | 80 | label: $localize`Relevance` |
85 | }, | 81 | }, |
86 | { | 82 | { |
87 | id: '-publishedAt', | 83 | id: '-publishedAt', |
88 | label: this.i18n('Publish date') | 84 | label: $localize`Publish date` |
89 | }, | 85 | }, |
90 | { | 86 | { |
91 | id: '-views', | 87 | id: '-views', |
92 | label: this.i18n('Views') | 88 | label: $localize`Views` |
93 | } | 89 | } |
94 | ] | 90 | ] |
95 | } | 91 | } |