traxxx/assets/components/home/home.vue

53 lines
1.1 KiB
Vue
Raw Normal View History

<template>
<div class="content">
<FilterBar
:fetch-releases="fetchReleases"
:is-home="true"
/>
<div class="content-inner">
2020-02-26 00:15:50 +00:00
<Releases :releases="releases" />
</div>
</div>
</template>
<script>
import FilterBar from '../header/filter-bar.vue';
import Releases from '../releases/releases.vue';
2019-09-10 14:48:04 +00:00
async function fetchReleases() {
this.releases = await this.$store.dispatch('fetchReleases', {
limit: (this.$route.query && this.$route.query.limit && Number(this.$route.query.limit)) || 30,
range: this.$route.name,
});
}
async function mounted() {
this.pageTitle = '';
await this.fetchReleases();
}
export default {
components: {
FilterBar,
Releases,
},
data() {
return {
releases: [],
networks: [],
pageTitle: null,
from: null,
};
},
beforeRouteEnter(to, from, next) {
next(vm => vm.$set(vm, 'from', from));
},
mounted,
methods: {
fetchReleases,
},
};
</script>