Added dedicated stash page. Using preview tiles for stashes on user page.
This commit is contained in:
@@ -1,6 +1,62 @@
|
||||
import { post, del } from '../api';
|
||||
import { graphql, post, del } from '../api';
|
||||
import { releaseFields } from '../fragments';
|
||||
import { curateStash } from '../curate';
|
||||
|
||||
function initStashesActions(_store, _router) {
|
||||
async function fetchStash(context, stashId) {
|
||||
const { stash } = await graphql(`
|
||||
query Stash(
|
||||
$stashId: Int!
|
||||
) {
|
||||
stash(id: $stashId) {
|
||||
id
|
||||
name
|
||||
slug
|
||||
public
|
||||
user {
|
||||
id
|
||||
username
|
||||
}
|
||||
actors: stashesActors {
|
||||
comment
|
||||
actor {
|
||||
id
|
||||
name
|
||||
slug
|
||||
gender
|
||||
age
|
||||
ageFromBirth
|
||||
dateOfBirth
|
||||
birthCity
|
||||
birthState
|
||||
birthCountry: countryByBirthCountryAlpha2 {
|
||||
alpha2
|
||||
name
|
||||
alias
|
||||
}
|
||||
avatar: avatarMedia {
|
||||
id
|
||||
path
|
||||
thumbnail
|
||||
lazy
|
||||
}
|
||||
}
|
||||
}
|
||||
scenes: stashesScenes {
|
||||
comment
|
||||
scene {
|
||||
${releaseFields}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`, {
|
||||
stashId: Number(stashId),
|
||||
});
|
||||
|
||||
return curateStash(stash);
|
||||
}
|
||||
|
||||
async function stashActor(context, { actorId, stashId }) {
|
||||
await post(`/stashes/${stashId}/actors`, { actorId });
|
||||
}
|
||||
@@ -26,6 +82,7 @@ function initStashesActions(_store, _router) {
|
||||
}
|
||||
|
||||
return {
|
||||
fetchStash,
|
||||
stashActor,
|
||||
stashScene,
|
||||
stashMovie,
|
||||
|
||||
Reference in New Issue
Block a user