Abstracted fragments and curation. Using GraphQL for tags.

This commit is contained in:
2019-12-16 05:30:25 +01:00
parent f4c2e6c08c
commit 6950a76cb5
10 changed files with 260 additions and 159 deletions

View File

@@ -50,7 +50,7 @@
</div>
<div class="content-inner">
<Releases :releases="releases" />
<Releases :releases="tag.releases" />
</div>
</div>
</div>
@@ -68,17 +68,13 @@ import Releases from '../releases/releases.vue';
const converter = new Converter();
async function fetchReleases() {
this.releases = await this.$store.dispatch('fetchTagReleases', this.$route.params.tagSlug);
this.tag = await this.$store.dispatch('fetchTags', { tagSlug: this.$route.params.tagSlug });
}
async function mounted() {
[this.tag] = await Promise.all([
this.$store.dispatch('fetchTags', { tagId: this.$route.params.tagSlug }),
this.fetchReleases(),
]);
this.description = converter.makeHtml(escapeHtml(this.tag.description));
this.tag = await this.$store.dispatch('fetchTags', { tagSlug: this.$route.params.tagSlug });
this.description = this.tag.description && converter.makeHtml(escapeHtml(this.tag.description));
this.pageTitle = this.tag.name;
}
@@ -90,6 +86,7 @@ export default {
data() {
return {
tag: null,
description: null,
releases: null,
pageTitle: null,
};

View File

@@ -47,7 +47,7 @@ import Tag from '../tile/tag.vue';
async function mounted() {
const tags = await this.$store.dispatch('fetchTags', {
slug: [
slugs: [
'airtight',
'anal',
'double-anal',