Added parent-child relations to network, showing parent network in sidebar. Added Burning Angel using Gamma API.

This commit is contained in:
2020-02-20 02:35:23 +01:00
parent 6b358d74db
commit 377970f874
30 changed files with 3174 additions and 913 deletions

View File

@@ -57,9 +57,12 @@ function curateNetwork(network, releases) {
name: network.name,
slug: network.slug,
url: network.url,
networks: [],
};
if (network.parent) curatedNetwork.parent = curateNetwork(network.parent);
if (network.sites) curatedNetwork.sites = network.sites.map(site => curateSite(site, curatedNetwork));
if (network.networks) curatedNetwork.networks = network.networks.map(subNetwork => curateNetwork(subNetwork));
if (network.studios) curatedNetwork.studios = network.studios;
if (releases) curatedNetwork.releases = releases.map(release => curateRelease(release));

View File

@@ -18,6 +18,14 @@ function initNetworksActions(store, _router) {
name
slug
url
networks: childNetworks(
orderBy: NAME_ASC,
) {
id
name
slug
url
}
sites(
orderBy: [PRIORITY_DESC, NAME_ASC],
filter: {
@@ -45,12 +53,23 @@ function initNetworksActions(store, _router) {
slug
url
}
parent {
id
name
slug
url
}
}
releases(
first: $limit,
orderBy: $orderBy,
filter: {
site: { network: { slug: { equalTo: $networkSlug } } }
site: {
or: [
{ network: { slug: { equalTo: $networkSlug } } },
{ network: { parent: { slug: { equalTo: $networkSlug } } } }
]
}
date: {
lessThan: $before,
greaterThan: $after,