forked from DebaucheryLibrarian/traxxx
73 lines
1.2 KiB
Vue
73 lines
1.2 KiB
Vue
<template>
|
|
<div class="content">
|
|
<FilterBar
|
|
:fetch-releases="fetchReleases"
|
|
:is-home="true"
|
|
:items-total="totalCount"
|
|
:items-per-page="limit"
|
|
/>
|
|
|
|
<div class="content-inner">
|
|
<Releases :releases="releases" />
|
|
|
|
<Pagination
|
|
:items-total="totalCount"
|
|
:items-per-page="limit"
|
|
class="pagination-bottom"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import FilterBar from '../header/filter-bar.vue';
|
|
import Releases from '../releases/releases.vue';
|
|
import Pagination from '../pagination/pagination.vue';
|
|
|
|
async function fetchReleases() {
|
|
const { releases, totalCount } = await this.$store.dispatch('fetchReleases', {
|
|
limit: this.limit,
|
|
pageNumber: Number(this.$route.params.pageNumber) || 1,
|
|
range: this.$route.name,
|
|
});
|
|
|
|
this.totalCount = totalCount;
|
|
this.releases = releases;
|
|
}
|
|
|
|
async function route() {
|
|
await this.fetchReleases();
|
|
}
|
|
|
|
async function mounted() {
|
|
this.pageTitle = '';
|
|
|
|
await this.fetchReleases();
|
|
}
|
|
|
|
export default {
|
|
components: {
|
|
FilterBar,
|
|
Releases,
|
|
Pagination,
|
|
},
|
|
data() {
|
|
return {
|
|
releases: [],
|
|
networks: [],
|
|
pageTitle: null,
|
|
limit: 15,
|
|
totalCount: 0,
|
|
from: null,
|
|
};
|
|
},
|
|
watch: {
|
|
$route: route,
|
|
},
|
|
mounted,
|
|
methods: {
|
|
fetchReleases,
|
|
},
|
|
};
|
|
</script>
|