2019-11-11 04:18:28 +00:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
v-if="tag"
|
|
|
|
class="content tag"
|
|
|
|
>
|
2019-11-15 04:10:59 +00:00
|
|
|
<FilterBar :fetch-releases="fetchReleases" />
|
|
|
|
|
2019-11-11 04:18:28 +00:00
|
|
|
<div class="header">
|
|
|
|
<span>
|
2019-11-14 04:13:38 +00:00
|
|
|
<h2 class="title">
|
|
|
|
<Icon icon="price-tag4" />
|
|
|
|
{{ tag.name }}
|
|
|
|
</h2>
|
2019-11-11 04:18:28 +00:00
|
|
|
|
|
|
|
<span class="description">{{ tag.description }}</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content-inner">
|
2019-11-16 02:33:36 +00:00
|
|
|
<Releases
|
|
|
|
:releases="releases"
|
|
|
|
:context="tag.name"
|
|
|
|
/>
|
2019-11-11 04:18:28 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-11-15 04:10:59 +00:00
|
|
|
import FilterBar from '../header/filter-bar.vue';
|
2019-11-16 02:33:36 +00:00
|
|
|
import Releases from '../releases/releases.vue';
|
2019-11-11 04:18:28 +00:00
|
|
|
|
2019-11-15 04:10:59 +00:00
|
|
|
async function fetchReleases() {
|
2019-11-11 04:18:28 +00:00
|
|
|
this.releases = await this.$store.dispatch('fetchTagReleases', this.$route.params.tagSlug);
|
2019-11-15 04:10:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
async function mounted() {
|
|
|
|
[[this.tag]] = await Promise.all([
|
|
|
|
this.$store.dispatch('fetchTags', this.$route.params.tagSlug),
|
|
|
|
this.fetchReleases(),
|
|
|
|
]);
|
2019-11-11 04:18:28 +00:00
|
|
|
|
|
|
|
this.pageTitle = this.tag.name;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2019-11-15 04:10:59 +00:00
|
|
|
FilterBar,
|
2019-11-16 02:33:36 +00:00
|
|
|
Releases,
|
2019-11-11 04:18:28 +00:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
tag: null,
|
|
|
|
releases: null,
|
|
|
|
pageTitle: null,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted,
|
2019-11-15 04:10:59 +00:00
|
|
|
methods: {
|
|
|
|
fetchReleases,
|
|
|
|
},
|
2019-11-11 04:18:28 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import 'theme';
|
|
|
|
|
|
|
|
.header {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
padding: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
|
|
display: inline-block;
|
|
|
|
margin: 0 .5rem 0 0;
|
|
|
|
text-transform: capitalize;
|
2019-11-14 04:13:38 +00:00
|
|
|
|
|
|
|
.icon {
|
|
|
|
width: 1.25rem;
|
|
|
|
height: 1.25rem;
|
|
|
|
}
|
2019-11-11 04:18:28 +00:00
|
|
|
}
|
|
|
|
</style>
|