Compare commits

..

No commits in common. "d5bf25301171d7a622d50cf4ec887b353bffdc32" and "e12de5ec00059e7b3c535fe4d91fc023a6dbcb18" have entirely different histories.

6 changed files with 22 additions and 111 deletions

View File

@ -59,20 +59,6 @@
class="avatar-fallback" class="avatar-fallback"
></span> ></span>
<Icon
v-show="favorited"
icon="heart7"
class="stash stashed"
@click.prevent.native="unstashActor"
/>
<Icon
v-show="favorited === false"
icon="heart8"
class="stash unstashed"
@click.prevent.native="stashActor"
/>
<span <span
class="details" class="details"
> >
@ -129,36 +115,6 @@
<script> <script>
import Gender from './gender.vue'; import Gender from './gender.vue';
async function stashActor() {
this.favorited = true;
try {
await this.$store.dispatch('stashActor', {
actorId: this.actor.id,
stashId: this.$store.getters.favorites.id,
});
this.$emit('stash', true);
} catch (error) {
this.favorited = false;
}
}
async function unstashActor() {
this.favorited = false;
try {
await this.$store.dispatch('unstashActor', {
actorId: this.actor.id,
stashId: this.$store.getters.favorites.id,
});
this.$emit('stash', false);
} catch (error) {
this.favorited = true;
}
}
function sfw() { function sfw() {
return this.$store.state.ui.sfw; return this.$store.state.ui.sfw;
} }
@ -177,19 +133,9 @@ export default {
default: null, default: null,
}, },
}, },
emits: ['stash'],
data() {
return {
favorited: this.actor.isFavorited,
};
},
computed: { computed: {
sfw, sfw,
}, },
methods: {
stashActor,
unstashActor,
},
}; };
</script> </script>
@ -297,22 +243,6 @@ export default {
opacity: .1; opacity: .1;
} }
.stash {
width: 1.25rem;
height: 1.25rem;
padding: .25rem .25rem .5rem .5rem;
position: absolute;
top: 0;
right: 0;
fill: var(--lighten-weak);
filter: drop-shadow(0 0 2px var(--darken));
&:hover,
&.stashed {
fill: var(--primary);
}
}
.details { .details {
background: var(--darken); background: var(--darken);
color: var(--text-light); color: var(--text-light);

View File

@ -2,16 +2,10 @@ import config from 'config';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { graphql, get } from '../api'; import { graphql, get } from '../api';
import { releaseFields, getIncludedEntities, getIncludedActors } from '../fragments';
import { curateActor, curateRelease } from '../curate'; import { curateActor, curateRelease } from '../curate';
import getDateRange from '../get-date-range'; import getDateRange from '../get-date-range';
import {
releaseFields,
actorStashesFields,
getIncludedEntities,
getIncludedActors,
} from '../fragments';
function initActorActions(store, router) { function initActorActions(store, router) {
async function fetchActorById({ _commit }, { async function fetchActorById({ _commit }, {
actorId, actorId,
@ -252,7 +246,23 @@ function initActorActions(store, router) {
} }
totalCount totalCount
} }
${actorStashesFields} isStashed
stashes: stashesActors(
filter: {
stash: {
userId: {
equalTo: $userId
}
}
}
) @include(if: $hasAuth) {
stash {
id
name
slug
primary
}
}
} }
} }
`, { `, {
@ -336,8 +346,6 @@ function initActorActions(store, router) {
$offset: Int = 0, $offset: Int = 0,
$letter: String! = "", $letter: String! = "",
$naturalBoobs: Boolean, $naturalBoobs: Boolean,
$userId: Int,
$hasAuth: Boolean!,
) { ) {
connection: actorsConnection( connection: actorsConnection(
first: $limit, first: $limit,
@ -405,7 +413,6 @@ function initActorActions(store, router) {
name name
alias alias
} }
${actorStashesFields}
} }
} }
} }
@ -414,8 +421,6 @@ function initActorActions(store, router) {
limit, limit,
letter, letter,
naturalBoobs, naturalBoobs,
hasAuth: !!store.state.auth.user,
userId: store.state.auth.user?.id,
}); });
return { return {

View File

@ -40,27 +40,6 @@ const sitesFragment = `
} }
`; `;
const actorStashesFields = `
isStashed
isFavorited
stashes: stashesActors(
filter: {
stash: {
userId: {
equalTo: $userId
}
}
}
) @include(if: $hasAuth) {
stash {
id
name
slug
primary
}
}
`;
const actorFields = ` const actorFields = `
id id
name name
@ -93,7 +72,6 @@ const actorFields = `
name name
alias alias
} }
${actorStashesFields}
`; `;
const releaseActorsFragment = ` const releaseActorsFragment = `
@ -477,7 +455,6 @@ function getIncludedActors(router) {
} }
export { export {
actorStashesFields,
releaseActorsFragment, releaseActorsFragment,
releaseFields, releaseFields,
releaseTagsFragment, releaseTagsFragment,

View File

@ -1,5 +1,5 @@
import { graphql } from '../api'; import { graphql } from '../api';
import { releaseFields, actorStashesFields } from '../fragments'; import { releaseFields } from '../fragments';
import { curateRelease, curateActor } from '../curate'; import { curateRelease, curateActor } from '../curate';
function initUiActions(store, _router) { function initUiActions(store, _router) {
@ -116,7 +116,6 @@ function initUiActions(store, _router) {
name name
alias alias
} }
${actorStashesFields}
} }
} }
`, { `, {

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.191.0", "version": "1.190.6",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"version": "1.191.0", "version": "1.190.6",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@casl/ability": "^5.2.2", "@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.191.0", "version": "1.190.6",
"description": "All the latest porn releases in one place", "description": "All the latest porn releases in one place",
"main": "src/app.js", "main": "src/app.js",
"scripts": { "scripts": {