diff options
author | Chocobozzz <me@florianbigard.com> | 2020-05-29 16:16:24 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-06-10 14:02:41 +0200 |
commit | 5fb2e2888ce032c638e4b75d07458642f0833e52 (patch) | |
tree | 8830d873569316889b8134027e9a43b198cca38f /client/src/app/search/search-filters.component.ts | |
parent | 62e7be634bc189f942ae51cb4b080079ab503ff0 (diff) | |
download | PeerTube-5fb2e2888ce032c638e4b75d07458642f0833e52.tar.gz PeerTube-5fb2e2888ce032c638e4b75d07458642f0833e52.tar.zst PeerTube-5fb2e2888ce032c638e4b75d07458642f0833e52.zip |
First implem global search
Diffstat (limited to 'client/src/app/search/search-filters.component.ts')
-rw-r--r-- | client/src/app/search/search-filters.component.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/search/search-filters.component.ts b/client/src/app/search/search-filters.component.ts index 344a260df..af76260a7 100644 --- a/client/src/app/search/search-filters.component.ts +++ b/client/src/app/search/search-filters.component.ts | |||
@@ -44,7 +44,7 @@ export class SearchFiltersComponent implements OnInit { | |||
44 | this.tagValidatorsMessages = this.videoValidatorsService.VIDEO_TAGS.MESSAGES | 44 | this.tagValidatorsMessages = this.videoValidatorsService.VIDEO_TAGS.MESSAGES |
45 | this.publishedDateRanges = [ | 45 | this.publishedDateRanges = [ |
46 | { | 46 | { |
47 | id: undefined, | 47 | id: 'any_published_date', |
48 | label: this.i18n('Any') | 48 | label: this.i18n('Any') |
49 | }, | 49 | }, |
50 | { | 50 | { |
@@ -67,7 +67,7 @@ export class SearchFiltersComponent implements OnInit { | |||
67 | 67 | ||
68 | this.durationRanges = [ | 68 | this.durationRanges = [ |
69 | { | 69 | { |
70 | id: undefined, | 70 | id: 'any_duration', |
71 | label: this.i18n('Any') | 71 | label: this.i18n('Any') |
72 | }, | 72 | }, |
73 | { | 73 | { |
@@ -147,6 +147,10 @@ export class SearchFiltersComponent implements OnInit { | |||
147 | this.originallyPublishedStartYear = this.originallyPublishedEndYear = undefined | 147 | this.originallyPublishedStartYear = this.originallyPublishedEndYear = undefined |
148 | } | 148 | } |
149 | 149 | ||
150 | isSearchTargetEnabled () { | ||
151 | return this.serverConfig.search.searchIndex.enabled && this.serverConfig.search.searchIndex.disableLocalSearch !== true | ||
152 | } | ||
153 | |||
150 | private loadOriginallyPublishedAtYears () { | 154 | private loadOriginallyPublishedAtYears () { |
151 | this.originallyPublishedStartYear = this.advancedSearch.originallyPublishedStartDate | 155 | this.originallyPublishedStartYear = this.advancedSearch.originallyPublishedStartDate |
152 | ? new Date(this.advancedSearch.originallyPublishedStartDate).getFullYear().toString() | 156 | ? new Date(this.advancedSearch.originallyPublishedStartDate).getFullYear().toString() |