Generalized filters bar, added to network page.

This commit is contained in:
2019-11-15 02:37:17 +01:00
parent 23492bb5d0
commit 0575dbc7e4
17 changed files with 193 additions and 113 deletions

View File

@@ -3,6 +3,8 @@
v-if="network"
class="content network"
>
<FilterBar :fetch-releases="fetchReleases" />
<div class="content-inner">
<div class="header">
<a
@@ -54,12 +56,19 @@
</template>
<script>
import FilterBar from '../header/filter-bar.vue';
import ReleaseTile from '../tile/release.vue';
import SiteTile from '../tile/site.vue';
async function mounted() {
[this.network] = await this.$store.dispatch('fetchNetworks', this.$route.params.networkSlug);
async function fetchReleases() {
this.releases = await this.$store.dispatch('fetchNetworkReleases', this.$route.params.networkSlug);
}
async function mounted() {
[[this.network]] = await Promise.all([
this.$store.dispatch('fetchNetworks', this.$route.params.networkSlug),
this.fetchReleases(),
]);
this.sites = this.network.sites
.filter(site => !site.independent)
@@ -70,6 +79,7 @@ async function mounted() {
export default {
components: {
FilterBar,
ReleaseTile,
SiteTile,
},
@@ -82,6 +92,9 @@ export default {
};
},
mounted,
methods: {
fetchReleases,
},
};
</script>