Restored 'new' label client-side.

This commit is contained in:
DebaucheryLibrarian
2023-06-16 00:47:19 +02:00
parent 078837f276
commit c4424f30ec
7 changed files with 39 additions and 23 deletions

View File

@@ -10,6 +10,7 @@ import {
actorStashesFields,
getIncludedEntities,
getIncludedActors,
batchFragment,
} from '../fragments';
function initActorActions(store, router) {
@@ -27,7 +28,7 @@ function initActorActions(store, router) {
const includedTags = router.currentRoute.value.query.tags ? router.currentRoute.value.query.tags.split(',') : [];
const mode = router.currentRoute.value.query.mode || 'all';
const { actor } = await graphql(`
const { actor, batches: [lastBatch] } = await graphql(`
query Actor(
$actorId: Int!
$userId: Int,
@@ -254,6 +255,7 @@ function initActorActions(store, router) {
}
${actorStashesFields}
}
${batchFragment}
}
`, {
actorId,
@@ -281,7 +283,7 @@ function initActorActions(store, router) {
return {
actor: curateActor(actor, null, curateRelease),
releases: actor.scenesConnection.releases.map((release) => curateRelease(release)),
releases: actor.scenesConnection.releases.map((release) => curateRelease(release, 'scene', { lastBatch: lastBatch.id })),
totalCount: actor.scenesConnection.totalCount,
};
}