Associating actors without network.

This commit is contained in:
2020-05-13 02:56:20 +02:00
parent 5a82e769c7
commit 6040a3f41f
53 changed files with 245 additions and 533 deletions

View File

@@ -8,6 +8,10 @@ import { curateRelease } from '../curate';
import getDateRange from '../get-date-range';
function curateActor(actor) {
if (!actor) {
return null;
}
const curatedActor = {
...actor,
height: actor.heightMetric && {
@@ -49,7 +53,7 @@ function initActorActions(store, _router) {
async function fetchActorBySlug({ _commit }, { actorSlug, limit = 100, range = 'latest' }) {
const { before, after, orderBy } = getDateRange(range);
const { actor } = await graphql(`
const { actors: [actor] } = await graphql(`
query Actor(
$actorSlug: String!
$limit:Int = 1000,
@@ -58,7 +62,14 @@ function initActorActions(store, _router) {
$orderBy:[ReleasesActorsOrderBy!]
$exclude: [String!]
) {
actor: actorBySlug(slug: $actorSlug) {
actors(filter: {
slug: {
equalTo: $actorSlug,
},
networkId: {
isNull: true,
},
}) {
id
name
slug
@@ -84,11 +95,13 @@ function initActorActions(store, _router) {
name
slug
}
avatar: actorsAvatarByActorId {
media {
thumbnail
path
copyright
actorsProfiles {
actorsAvatarByProfileId {
media {
path
thumbnail
copyright
}
}
}
photos: actorsPhotos {
@@ -225,9 +238,13 @@ function initActorActions(store, _router) {
name
slug
}
avatar: actorsAvatarByActorId {
media {
thumbnail
actorsProfiles {
actorsAvatarByProfileId {
media {
path
thumbnail
copyright
}
}
}
birthCountry: countryByBirthCountryAlpha2 {

View File

@@ -47,9 +47,13 @@ const actorFields = `
name
alias
}
avatar: actorsAvatarByActorId {
media {
thumbnail
actorsProfiles {
actorsAvatarByProfileId {
media {
path
thumbnail
copyright
}
}
}
`;

View File

@@ -11,6 +11,14 @@ function initUiObservers(store, _router) {
if (event.key === 'n') {
store.dispatch('setSfw', false);
}
if (event.key === 'd') {
store.dispatch('setTheme', 'dark');
}
if (event.key === 'l') {
store.dispatch('setTheme', 'light');
}
});
}