diff options
Diffstat (limited to 'client/src/app/search')
-rw-r--r-- | client/src/app/search/search-filters.component.html | 10 | ||||
-rw-r--r-- | client/src/app/search/search.component.ts | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/client/src/app/search/search-filters.component.html b/client/src/app/search/search-filters.component.html index 07fb2c048..60680c7bd 100644 --- a/client/src/app/search/search-filters.component.html +++ b/client/src/app/search/search-filters.component.html | |||
@@ -103,7 +103,7 @@ | |||
103 | </button> | 103 | </button> |
104 | <div class="peertube-select-container"> | 104 | <div class="peertube-select-container"> |
105 | <select id="category" name="category" [(ngModel)]="advancedSearch.categoryOneOf"> | 105 | <select id="category" name="category" [(ngModel)]="advancedSearch.categoryOneOf"> |
106 | <option [value]="undefined" i18n>Any or no category set</option> | 106 | <option [value]="undefined" i18n>Display all categories</option> |
107 | <option *ngFor="let category of videoCategories" [value]="category.id">{{ category.label }}</option> | 107 | <option *ngFor="let category of videoCategories" [value]="category.id">{{ category.label }}</option> |
108 | </select> | 108 | </select> |
109 | </div> | 109 | </div> |
@@ -116,7 +116,7 @@ | |||
116 | </button> | 116 | </button> |
117 | <div class="peertube-select-container"> | 117 | <div class="peertube-select-container"> |
118 | <select id="licence" name="licence" [(ngModel)]="advancedSearch.licenceOneOf"> | 118 | <select id="licence" name="licence" [(ngModel)]="advancedSearch.licenceOneOf"> |
119 | <option [value]="undefined" i18n>Any or no license set</option> | 119 | <option [value]="undefined" i18n>Display all licenses</option> |
120 | <option *ngFor="let licence of videoLicences" [value]="licence.id">{{ licence.label }}</option> | 120 | <option *ngFor="let licence of videoLicences" [value]="licence.id">{{ licence.label }}</option> |
121 | </select> | 121 | </select> |
122 | </div> | 122 | </div> |
@@ -129,7 +129,7 @@ | |||
129 | </button> | 129 | </button> |
130 | <div class="peertube-select-container"> | 130 | <div class="peertube-select-container"> |
131 | <select id="language" name="language" [(ngModel)]="advancedSearch.languageOneOf"> | 131 | <select id="language" name="language" [(ngModel)]="advancedSearch.languageOneOf"> |
132 | <option [value]="undefined" i18n>Any or no language set</option> | 132 | <option [value]="undefined" i18n>Display all languages</option> |
133 | <option *ngFor="let language of videoLanguages" [value]="language.id">{{ language.label }}</option> | 133 | <option *ngFor="let language of videoLanguages" [value]="language.id">{{ language.label }}</option> |
134 | </select> | 134 | </select> |
135 | </div> | 135 | </div> |
@@ -146,7 +146,7 @@ | |||
146 | [(ngModel)]="advancedSearch.tagsAllOf" name="tagsAllOf" id="tagsAllOf" | 146 | [(ngModel)]="advancedSearch.tagsAllOf" name="tagsAllOf" id="tagsAllOf" |
147 | [validators]="tagValidators" [errorMessages]="tagValidatorsMessages" | 147 | [validators]="tagValidators" [errorMessages]="tagValidatorsMessages" |
148 | i18n-placeholder placeholder="+ Tag" i18n-secondaryPlaceholder secondaryPlaceholder="Enter a tag" | 148 | i18n-placeholder placeholder="+ Tag" i18n-secondaryPlaceholder secondaryPlaceholder="Enter a tag" |
149 | maxItems="5" modelAsStrings="true" | 149 | [maxItems]="5" [modelAsStrings]="true" |
150 | ></tag-input> | 150 | ></tag-input> |
151 | </div> | 151 | </div> |
152 | 152 | ||
@@ -159,7 +159,7 @@ | |||
159 | [(ngModel)]="advancedSearch.tagsOneOf" name="tagsOneOf" id="tagsOneOf" | 159 | [(ngModel)]="advancedSearch.tagsOneOf" name="tagsOneOf" id="tagsOneOf" |
160 | [validators]="tagValidators" [errorMessages]="tagValidatorsMessages" | 160 | [validators]="tagValidators" [errorMessages]="tagValidatorsMessages" |
161 | i18n-placeholder placeholder="+ Tag" i18n-secondaryPlaceholder secondaryPlaceholder="Enter a tag" | 161 | i18n-placeholder placeholder="+ Tag" i18n-secondaryPlaceholder secondaryPlaceholder="Enter a tag" |
162 | maxItems="5" modelAsStrings="true" | 162 | [maxItems]="5" [modelAsStrings]="true" |
163 | ></tag-input> | 163 | ></tag-input> |
164 | </div> | 164 | </div> |
165 | </div> | 165 | </div> |
diff --git a/client/src/app/search/search.component.ts b/client/src/app/search/search.component.ts index dfd8d8823..075994dd3 100644 --- a/client/src/app/search/search.component.ts +++ b/client/src/app/search/search.component.ts | |||
@@ -141,7 +141,8 @@ export class SearchComponent implements OnInit, OnDestroy { | |||
141 | return this.advancedSearch.size() | 141 | return this.advancedSearch.size() |
142 | } | 142 | } |
143 | 143 | ||
144 | removeVideoFromArray (video: Video) { | 144 | // Add VideoChannel for typings, but the template already checks "video" argument is a video |
145 | removeVideoFromArray (video: Video | VideoChannel) { | ||
145 | this.results = this.results.filter(r => !this.isVideo(r) || r.id !== video.id) | 146 | this.results = this.results.filter(r => !this.isVideo(r) || r.id !== video.id) |
146 | } | 147 | } |
147 | 148 | ||