Fix active filters display

This commit is contained in:
Chocobozzz 2020-09-16 10:30:16 +02:00
parent 5f828b55f4
commit ba4cd3049b
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 7 additions and 3 deletions

View File

@ -30,7 +30,7 @@
<div class="button-rows">
<button class="filters-button peertube-button" v-on:click="toggleFilters()">
<translate>Filters</translate>
<span v-if="countActiveFilters()" v-translate> ({{ countActiveFilters() }} active)</span>
<span v-if="activeFilters" v-translate="{ activeFilters: activeFilters }"> (%{activeFilters} active)</span>
<div class="arrow-down"></div>
</button>
@ -169,7 +169,7 @@
<span v-if="resultsCount !== null && resultsCount !== 0" v-translate="{ resultsCount: resultsCount }">%{resultsCount} results found for</span>&nbsp;
<strong>
{{ searchedTerm }}
<span v-if="countActiveFilters() > 0" v-translate="{ activeFilters: countActiveFilters() }">with %{activeFilters} active filters</span>
<span v-if="activeFilters > 0" v-translate="{ activeFilters: activeFilters }">with %{activeFilters} active filters</span>
</strong>
&nbsp;
@ -467,7 +467,9 @@
formTagAllOf: '',
formTagOneOf: '',
formTagsAllOf: [],
formTagsOneOf: []
formTagsOneOf: [],
activeFilters: 0
}
},
@ -645,6 +647,8 @@
Nprogress.done()
this.activeFilters = this.countActiveFilters()
this.channelsCount = channelsResult.total
this.videosCount = videosResult.total