Added various tag photos and descriptions.
This commit is contained in:
@@ -55,14 +55,14 @@
|
||||
v-show="me && isStashed"
|
||||
icon="heart7"
|
||||
class="stash stashed noselect"
|
||||
@click="unstashScene"
|
||||
@click="unstashRelease"
|
||||
/>
|
||||
|
||||
<Icon
|
||||
v-show="me && !isStashed"
|
||||
icon="heart8"
|
||||
class="stash unstashed noselect"
|
||||
@click="stashScene"
|
||||
@click="stashRelease"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -251,18 +251,20 @@ async function fetchRelease(scroll = true) {
|
||||
}
|
||||
}
|
||||
|
||||
async function stashScene() {
|
||||
this.$store.dispatch('stashScene', {
|
||||
async function stashRelease() {
|
||||
this.$store.dispatch(this.$route.name === 'movie' ? 'stashMovie' : 'stashRelease', {
|
||||
sceneId: this.release.id,
|
||||
movieId: this.release.id,
|
||||
stashId: this.$store.getters.favorites.id,
|
||||
});
|
||||
|
||||
this.fetchRelease(false);
|
||||
}
|
||||
|
||||
async function unstashScene() {
|
||||
this.$store.dispatch('unstashScene', {
|
||||
async function unstashRelease() {
|
||||
this.$store.dispatch(this.$route.name === 'movie' ? 'unstashMovie' : 'unstashRelease', {
|
||||
sceneId: this.release.id,
|
||||
movieId: this.release.id,
|
||||
stashId: this.$store.getters.favorites.id,
|
||||
});
|
||||
|
||||
@@ -321,8 +323,8 @@ export default {
|
||||
mounted: fetchRelease,
|
||||
methods: {
|
||||
fetchRelease,
|
||||
stashScene,
|
||||
unstashScene,
|
||||
stashRelease,
|
||||
unstashRelease,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -138,7 +138,11 @@ function initReleasesActions(store, router) {
|
||||
// const release = await get(`/releases/${releaseId}`);
|
||||
|
||||
const { movie } = await graphql(`
|
||||
query Movie($movieId: Int!) {
|
||||
query Movie(
|
||||
$movieId: Int!
|
||||
$hasAuth: Boolean!
|
||||
$userId: Int
|
||||
) {
|
||||
movie(id: $movieId) {
|
||||
id
|
||||
title
|
||||
@@ -232,10 +236,27 @@ function initReleasesActions(store, router) {
|
||||
hasLogo
|
||||
}
|
||||
}
|
||||
stashes: stashesMovies(
|
||||
filter: {
|
||||
stash: {
|
||||
userId: {
|
||||
equalTo: $userId
|
||||
}
|
||||
}
|
||||
}
|
||||
) @include(if: $hasAuth) {
|
||||
stash {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`, {
|
||||
movieId: Number(movieId),
|
||||
hasAuth: !!store.state.auth.user,
|
||||
userId: store.state.auth.user?.id,
|
||||
});
|
||||
|
||||
if (!movie) {
|
||||
|
||||
@@ -17,11 +17,21 @@ function initStashesActions(_store, _router) {
|
||||
await del(`/stashes/${stashId}/scenes/${sceneId}`);
|
||||
}
|
||||
|
||||
async function stashMovie(context, { movieId, stashId }) {
|
||||
await post(`/stashes/${stashId}/movies`, { movieId });
|
||||
}
|
||||
|
||||
async function unstashMovie(context, { movieId, stashId }) {
|
||||
await del(`/stashes/${stashId}/movies/${movieId}`);
|
||||
}
|
||||
|
||||
return {
|
||||
stashActor,
|
||||
stashScene,
|
||||
stashMovie,
|
||||
unstashActor,
|
||||
unstashScene,
|
||||
unstashMovie,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user