105 lines
2.0 KiB
Vue
105 lines
2.0 KiB
Vue
<template>
|
|
<div
|
|
v-if="tag"
|
|
class="content tag"
|
|
>
|
|
<FilterBar :fetch-releases="fetchReleases" />
|
|
|
|
<div class="header">
|
|
<span>
|
|
<h2 class="title">
|
|
<Icon icon="price-tag4" />
|
|
{{ tag.name }}
|
|
</h2>
|
|
|
|
<span class="description">{{ tag.description }}</span>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="content-inner">
|
|
<h3 class="heading">Latest releases</h3>
|
|
|
|
<ul class="nolist scenes">
|
|
<li
|
|
v-for="release in releases"
|
|
:key="`release-${release.id}`"
|
|
>
|
|
<ReleaseTile :release="release" />
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import FilterBar from '../header/filter-bar.vue';
|
|
import ReleaseTile from '../tile/release.vue';
|
|
|
|
async function fetchReleases() {
|
|
this.releases = await this.$store.dispatch('fetchTagReleases', this.$route.params.tagSlug);
|
|
}
|
|
|
|
async function mounted() {
|
|
[[this.tag]] = await Promise.all([
|
|
this.$store.dispatch('fetchTags', this.$route.params.tagSlug),
|
|
this.fetchReleases(),
|
|
]);
|
|
|
|
this.pageTitle = this.tag.name;
|
|
}
|
|
|
|
export default {
|
|
components: {
|
|
FilterBar,
|
|
ReleaseTile,
|
|
},
|
|
data() {
|
|
return {
|
|
tag: null,
|
|
releases: null,
|
|
pageTitle: null,
|
|
};
|
|
},
|
|
mounted,
|
|
methods: {
|
|
fetchReleases,
|
|
},
|
|
};
|
|
</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;
|
|
|
|
.icon {
|
|
width: 1.25rem;
|
|
height: 1.25rem;
|
|
}
|
|
}
|
|
|
|
.heading {
|
|
padding: 0;
|
|
margin: 0 0 1rem 0;
|
|
}
|
|
|
|
.bio-heading {
|
|
display: inline-block;
|
|
font-weight: bold;
|
|
margin: .5rem 0 0 0;
|
|
|
|
&::after {
|
|
content: ':';
|
|
}
|
|
}
|
|
</style>
|