Compare commits
No commits in common. "b254bc22a4c7b586b497233ee74c534c50a1f3da" and "8cada403113bd5e261836e648e1e7a1e741607c9" have entirely different histories.
b254bc22a4
...
8cada40311
|
@ -3,42 +3,37 @@
|
||||||
v-if="user"
|
v-if="user"
|
||||||
class="bookmarks"
|
class="bookmarks"
|
||||||
>
|
>
|
||||||
<VDropdown
|
<VDropdown v-if="showSecondary">
|
||||||
v-if="showSecondary || (hasSecondaryStash && pageStash?.user.id !== user.id)"
|
|
||||||
:shown="showStashes"
|
|
||||||
@hide="showStashes = false"
|
|
||||||
>
|
|
||||||
<Icon
|
<Icon
|
||||||
icon="folder-heart"
|
icon="folder-heart"
|
||||||
class="heart noselect"
|
class="heart noselect"
|
||||||
:class="{ favorited: itemStashes.some((itemStash) => !itemStash.isPrimary) }"
|
:class="{ favorited: itemStashes.some((itemStash) => !itemStash.isPrimary) }"
|
||||||
@contextmenu.prevent="showStashes = true"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<template #popper>
|
<template #popper>
|
||||||
<StashMenu
|
<ul class="stash-menu nolist">
|
||||||
:user="user"
|
<li
|
||||||
:item-stashes="itemStashes"
|
v-for="userStash in user.stashes"
|
||||||
@stash="(stash) => stashItem(stash)"
|
:key="`stash-${userStash.id}`"
|
||||||
@unstash="(stash) => unstashItem(stash)"
|
class="menu-item"
|
||||||
/>
|
>
|
||||||
|
<label class="menu-stash">
|
||||||
|
<Checkbox
|
||||||
|
:checked="itemStashes.some((itemStash) => itemStash.id === userStash.id)"
|
||||||
|
@change="(checked) => checked ? stashItem(userStash) : unstashItem(userStash)"
|
||||||
|
/>{{ userStash.name }}
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
</VDropdown>
|
</VDropdown>
|
||||||
|
|
||||||
<VDropdown
|
|
||||||
v-if="showSecondary || !hasSecondaryStash || pageStash?.user.id === user.id"
|
|
||||||
:triggers="[]"
|
|
||||||
:shown="showStashes"
|
|
||||||
:disabled="showSecondary"
|
|
||||||
@hide="showStashes = false"
|
|
||||||
>
|
|
||||||
<template v-if="pageStash?.user.id === user.id">
|
<template v-if="pageStash?.user.id === user.id">
|
||||||
<Icon
|
<Icon
|
||||||
v-if="itemStashes.some((itemStash) => itemStash.id === pageStash.id)"
|
v-if="itemStashes.some((itemStash) => itemStash.id === pageStash.id)"
|
||||||
:icon="pageStash.isPrimary ? 'heart7' : 'folder-heart'"
|
:icon="pageStash.isPrimary ? 'heart7' : 'folder-heart'"
|
||||||
class="heart favorited noselect"
|
class="heart favorited noselect"
|
||||||
@click.native.stop="unstashItem(pageStash)"
|
@click.native.stop="unstashItem(pageStash)"
|
||||||
@contextmenu.prevent="toggleShowStashes(true)"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Icon
|
<Icon
|
||||||
|
@ -46,7 +41,6 @@
|
||||||
:icon="pageStash.isPrimary ? 'heart8' : 'folder-heart'"
|
:icon="pageStash.isPrimary ? 'heart8' : 'folder-heart'"
|
||||||
class="heart noselect"
|
class="heart noselect"
|
||||||
@click.native.stop="stashItem(pageStash)"
|
@click.native.stop="stashItem(pageStash)"
|
||||||
@contextmenu.prevent="toggleShowStashes(true)"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -56,7 +50,6 @@
|
||||||
icon="heart7"
|
icon="heart7"
|
||||||
class="heart favorited noselect"
|
class="heart favorited noselect"
|
||||||
@click.native.stop="unstashItem(user.primaryStash)"
|
@click.native.stop="unstashItem(user.primaryStash)"
|
||||||
@contextmenu.prevent="toggleShowStashes(true)"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Icon
|
<Icon
|
||||||
|
@ -64,30 +57,19 @@
|
||||||
icon="heart8"
|
icon="heart8"
|
||||||
class="heart noselect"
|
class="heart noselect"
|
||||||
@click.native.stop="stashItem(user.primaryStash)"
|
@click.native.stop="stashItem(user.primaryStash)"
|
||||||
@contextmenu.prevent="toggleShowStashes(true)"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #popper>
|
|
||||||
<StashMenu
|
|
||||||
:user="user"
|
|
||||||
:item-stashes="itemStashes"
|
|
||||||
@stash="(stash) => stashItem(stash)"
|
|
||||||
@unstash="(stash) => unstashItem(stash)"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</VDropdown>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, inject } from 'vue';
|
import { ref, inject } from 'vue';
|
||||||
|
|
||||||
import { post, del } from '#/src/api.js';
|
import { post, del } from '#/src/api.js';
|
||||||
import ellipsis from '#/utils/ellipsis.js';
|
import ellipsis from '#/utils/ellipsis.js';
|
||||||
|
|
||||||
import Icon from '#/components/icon/icon.vue';
|
import Icon from '#/components/icon/icon.vue';
|
||||||
import StashMenu from '#/components/stashes/menu.vue';
|
import Checkbox from '#/components/form/checkbox.vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
domain: {
|
domain: {
|
||||||
|
@ -110,10 +92,8 @@ const { user, pageProps } = inject('pageContext');
|
||||||
const pageStash = pageProps.stash;
|
const pageStash = pageProps.stash;
|
||||||
|
|
||||||
const itemStashes = ref(props.item.stashes);
|
const itemStashes = ref(props.item.stashes);
|
||||||
const hasSecondaryStash = computed(() => itemStashes.value.some((itemStash) => !itemStash.isPrimary));
|
|
||||||
|
|
||||||
const done = ref(true);
|
const done = ref(true);
|
||||||
const showStashes = ref(false);
|
|
||||||
const feedbackCutoff = 20;
|
const feedbackCutoff = 20;
|
||||||
|
|
||||||
const itemKeys = {
|
const itemKeys = {
|
||||||
|
@ -169,19 +149,6 @@ async function unstashItem(stash) {
|
||||||
|
|
||||||
done.value = true;
|
done.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleShowStashes(state) {
|
|
||||||
if (props.showSecondary) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state) {
|
|
||||||
showStashes.value = state;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
showStashes.value = !showStashes.value;
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -216,4 +183,23 @@ function toggleShowStashes(state) {
|
||||||
fill: var(--primary);
|
fill: var(--primary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu-item {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-stash {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: .5rem;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-container {
|
||||||
|
margin-right: .5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
<template>
|
|
||||||
<ul class="stash-menu nolist noselect">
|
|
||||||
<li
|
|
||||||
v-for="userStash in user.stashes"
|
|
||||||
:key="`stash-${userStash.id}`"
|
|
||||||
class="menu-item"
|
|
||||||
>
|
|
||||||
<label class="menu-stash">
|
|
||||||
<Checkbox
|
|
||||||
:checked="itemStashes.some((itemStash) => itemStash.id === userStash.id)"
|
|
||||||
@change="(checked) => checked ? emit('stash', userStash) : emit('unstash', userStash)"
|
|
||||||
/>{{ userStash.name }}
|
|
||||||
</label>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import Checkbox from '#/components/form/checkbox.vue';
|
|
||||||
|
|
||||||
defineProps({
|
|
||||||
user: {
|
|
||||||
type: Object,
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
itemStashes: {
|
|
||||||
type: Array,
|
|
||||||
default: () => [],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const emit = defineEmits(['stash', 'unstash']);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.menu-item {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-stash {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: .5rem;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
color: var(--primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.check-container {
|
|
||||||
margin-right: .5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx-web",
|
"name": "traxxx-web",
|
||||||
"version": "0.26.0",
|
"version": "0.25.8",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"version": "0.26.0",
|
"version": "0.25.8",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@brillout/json-serializer": "^0.5.8",
|
"@brillout/json-serializer": "^0.5.8",
|
||||||
"@dicebear/collection": "^7.0.5",
|
"@dicebear/collection": "^7.0.5",
|
||||||
|
|
|
@ -78,5 +78,5 @@
|
||||||
"postcss-custom-media": "^10.0.2",
|
"postcss-custom-media": "^10.0.2",
|
||||||
"postcss-nesting": "^12.0.2"
|
"postcss-nesting": "^12.0.2"
|
||||||
},
|
},
|
||||||
"version": "0.26.0"
|
"version": "0.25.8"
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,5 @@ const { abortReason } = pageContext;
|
||||||
.page {
|
.page {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-grow: 1;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -44,6 +44,7 @@ export async function onBeforeRender(pageContext) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
entityIds: [entity.id, entity.parent?.id].filter(Boolean),
|
entityIds: [entity.id, entity.parent?.id].filter(Boolean),
|
||||||
|
parentEntityId: entity.parent?.id,
|
||||||
minRatio: 1.5,
|
minRatio: 1.5,
|
||||||
allowRandomFallback: false,
|
allowRandomFallback: false,
|
||||||
},
|
},
|
||||||
|
|
|
@ -259,15 +259,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
|
||||||
v-if="campaigns?.scene"
|
|
||||||
class="section"
|
|
||||||
>
|
|
||||||
<Campaign
|
|
||||||
:campaign="campaigns.scene"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="section details">
|
<div class="section details">
|
||||||
<div class="detail">
|
<div class="detail">
|
||||||
<h3 class="heading">Added</h3>
|
<h3 class="heading">Added</h3>
|
||||||
|
@ -327,11 +318,10 @@ import MovieTile from '#/components/movies/tile.vue';
|
||||||
import SerieTile from '#/components/series/tile.vue';
|
import SerieTile from '#/components/series/tile.vue';
|
||||||
import Player from '#/components/video/player.vue';
|
import Player from '#/components/video/player.vue';
|
||||||
import Heart from '#/components/stashes/heart.vue';
|
import Heart from '#/components/stashes/heart.vue';
|
||||||
import Campaign from '#/components/campaigns/campaign.vue';
|
|
||||||
|
|
||||||
import summaryTemplate from '#/assets/summary.yaml';
|
import summaryTemplate from '#/assets/summary.yaml';
|
||||||
|
|
||||||
const { pageProps, campaigns } = inject('pageContext');
|
const { pageProps } = inject('pageContext');
|
||||||
const { scene } = pageProps;
|
const { scene } = pageProps;
|
||||||
|
|
||||||
const playing = ref(false);
|
const playing = ref(false);
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import { render } from 'vike/abort'; /* eslint-disable-line import/extensions */
|
|
||||||
import { fetchScenesById } from '#/src/scenes.js';
|
import { fetchScenesById } from '#/src/scenes.js';
|
||||||
import { getRandomCampaigns } from '#/src/campaigns.js';
|
|
||||||
|
|
||||||
function getTitle(scene) {
|
function getTitle(scene) {
|
||||||
if (scene.title) {
|
if (scene.title) {
|
||||||
|
@ -22,27 +20,12 @@ export async function onBeforeRender(pageContext) {
|
||||||
actorStashes: true,
|
actorStashes: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const campaigns = await getRandomCampaigns([
|
|
||||||
{
|
|
||||||
minRatio: 1.5,
|
|
||||||
entityIds: [scene.channel.id, scene.network?.id].filter(Boolean),
|
|
||||||
allowRandomFallback: false,
|
|
||||||
},
|
|
||||||
], { tagFilter: pageContext.tagFilter });
|
|
||||||
|
|
||||||
if (!scene) {
|
|
||||||
throw render(404, `Cannot find scene '${pageContext.routeParams.sceneId}'.`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
pageContext: {
|
pageContext: {
|
||||||
title: getTitle(scene),
|
title: getTitle(scene),
|
||||||
pageProps: {
|
pageProps: {
|
||||||
scene,
|
scene,
|
||||||
},
|
},
|
||||||
campaigns: {
|
|
||||||
scene: campaigns[0],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,14 +9,16 @@ const schema = buildSchema(`
|
||||||
${scenesSchema}
|
${scenesSchema}
|
||||||
`);
|
`);
|
||||||
|
|
||||||
|
const rootValue = {
|
||||||
|
scenes: fetchScenesGraphql,
|
||||||
|
};
|
||||||
|
|
||||||
export async function graphqlApi(req, res) {
|
export async function graphqlApi(req, res) {
|
||||||
const data = await graphql({
|
const data = await graphql({
|
||||||
schema,
|
schema,
|
||||||
source: req.body.query,
|
source: req.body.query,
|
||||||
variableValues: req.body.variables,
|
variableValues: req.body.variables,
|
||||||
rootValue: {
|
rootValue,
|
||||||
scenes: async (query) => fetchScenesGraphql(query, req),
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
|
@ -76,21 +76,16 @@ export const scenesSchema = `
|
||||||
export async function fetchScenesGraphql(query, req) {
|
export async function fetchScenesGraphql(query, req) {
|
||||||
const {
|
const {
|
||||||
scenes,
|
scenes,
|
||||||
/*
|
|
||||||
aggActors,
|
aggActors,
|
||||||
aggTags,
|
aggTags,
|
||||||
aggChannels,
|
aggChannels,
|
||||||
limit,
|
limit,
|
||||||
total,
|
total,
|
||||||
*/
|
|
||||||
} = await fetchScenes({}, {
|
} = await fetchScenes({}, {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 30,
|
limit: 30,
|
||||||
}, req.user);
|
}, req.user);
|
||||||
|
|
||||||
return scenes;
|
|
||||||
|
|
||||||
/*
|
|
||||||
return {
|
return {
|
||||||
scenes,
|
scenes,
|
||||||
aggActors,
|
aggActors,
|
||||||
|
@ -99,5 +94,4 @@ export async function fetchScenesGraphql(query, req) {
|
||||||
limit,
|
limit,
|
||||||
total,
|
total,
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
2
static
2
static
|
@ -1 +1 @@
|
||||||
Subproject commit af96f9b932db799ec8d067d4a5c9379f8363d2b0
|
Subproject commit 39f91b96b2bfa176a02d10c9051dd1d2f9c62b64
|
Loading…
Reference in New Issue