Applying tag filters to URL.
This commit is contained in:
@@ -41,7 +41,11 @@
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<FilterBar :fetch-releases="fetchSite" />
|
||||
<FilterBar
|
||||
:fetch-releases="fetchSite"
|
||||
:items-total="totalCount"
|
||||
:items-per-page="limit"
|
||||
/>
|
||||
|
||||
<div class="content-inner">
|
||||
<Releases :releases="releases" />
|
||||
@@ -54,12 +58,16 @@ import FilterBar from '../header/filter-bar.vue';
|
||||
import Releases from '../releases/releases.vue';
|
||||
|
||||
async function fetchSite() {
|
||||
this.site = await this.$store.dispatch('fetchSiteBySlug', {
|
||||
const { site, releases, totalCount } = await this.$store.dispatch('fetchSiteBySlug', {
|
||||
siteSlug: this.$route.params.siteSlug,
|
||||
range: this.$route.params.range,
|
||||
pageNumber: Number(this.$route.params.pageNumber) || 1,
|
||||
limit: this.limit,
|
||||
});
|
||||
|
||||
this.releases = this.site.releases;
|
||||
this.site = site;
|
||||
this.releases = releases;
|
||||
this.totalCount = totalCount;
|
||||
}
|
||||
|
||||
async function route() {
|
||||
@@ -81,6 +89,8 @@ export default {
|
||||
return {
|
||||
site: null,
|
||||
releases: null,
|
||||
totalCount: 0,
|
||||
limit: 10,
|
||||
pageTitle: null,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user