Added favorites button to actor page.

This commit is contained in:
DebaucheryLibrarian
2021-03-15 03:30:47 +01:00
parent e371e9725a
commit 77b40817f2
27 changed files with 466 additions and 169 deletions

View File

@@ -24,6 +24,8 @@ function initActorActions(store, router) {
const { actor } = await graphql(`
query Actor(
$actorId: Int!
$userId: Int,
$hasAuth: Boolean!,
$limit:Int = 10,
$offset:Int = 0,
$after:Datetime = "1900-01-01",
@@ -236,6 +238,21 @@ function initActorActions(store, router) {
}
totalCount
}
stashes: stashesActors(
filter: {
stash: {
userId: {
equalTo: $userId
}
}
}
) @include(if: $hasAuth) {
stash {
id
name
slug
}
}
}
}
`, {
@@ -253,6 +270,8 @@ function initActorActions(store, router) {
includedEntities: getIncludedEntities(router),
includedActors: getIncludedActors(router),
mode,
hasAuth: !!store.state.auth.user,
userId: store.state.auth.user?.id,
});
if (!actor) {