Implemented negative filters in back-end, added basic fixed filters settings dialog.

This commit is contained in:
2024-04-02 05:55:53 +02:00
parent 30fdbbd737
commit 98c25cd24e
17 changed files with 260 additions and 43 deletions

View File

@@ -11,6 +11,7 @@ export async function onBeforeRender(pageContext) {
...pageContext.urlQuery,
scope: pageContext.routeParams.scope || 'latest',
actorId: Number(pageContext.routeParams.actorId),
tagFilter: pageContext.tagFilter,
}), {
page: Number(pageContext.routeParams.page) || 1,
limit: Number(pageContext.urlParsed.search.limit) || 30,

View File

@@ -18,6 +18,7 @@ export async function onBeforeRender(pageContext) {
...pageContext.urlQuery,
scope: pageContext.routeParams.scope || 'latest',
entityId: Number(entityId),
tagFilter: pageContext.tagFilter,
}), {
page: Number(pageContext.routeParams.page) || 1,
limit: Number(pageContext.urlParsed.search.limit) || 30,

View File

@@ -24,11 +24,7 @@
v-else-if="scene.poster"
class="poster-container"
>
<a
:href="getPath(scene.poster)"
target="_blank"
class="poster-link"
>
<div class="poster-link">
<img
:src="getPath(scene.poster, 'thumbnail')"
:style="{ 'background-image': getPath(scene.poster, 'lazy') }"
@@ -36,7 +32,7 @@
:height="scene.poster.height"
class="poster"
>
</a>
</div>
</div>
<div
@@ -49,11 +45,7 @@
:key="`photo-${photo.id}`"
class="photo-container"
>
<a
:href="getPath(photo)"
target="_blank"
class="photo-link"
>
<div class="photo-link">
<img
:src="getPath(photo, 'thumbnail')"
:style="{ 'background-image': getPath(photo, 'lazy') }"
@@ -61,7 +53,7 @@
:height="photo.height"
class="photo"
>
</a>
</div>
</div>
</div>
</div>
@@ -99,10 +91,21 @@
</span>
</div>
<time
:datetime="scene.effectiveDate.toISOString()"
class="date ellipsis"
>{{ formatDate(scene.effectiveDate, 'MMMM d, y') }}</time>
<Link
:href="scene.url"
target="_blank"
class="date nolink"
>
<time
:datetime="scene.effectiveDate.toISOString()"
class="ellipsis compact-hide"
>{{ formatDate(scene.effectiveDate, 'MMMM d, y') }}</time>
<time
:datetime="scene.effectiveDate.toISOString()"
class="ellipsis compact-show"
>{{ formatDate(scene.effectiveDate, 'MMM d, y') }}</time>
</Link>
</div>
<div class="header">
@@ -526,6 +529,10 @@ const poster = computed(() => {
margin-left: .25rem;
}
.compact-show {
display: none;
}
@media(--small) {
.content {
margin: 0;
@@ -606,6 +613,20 @@ const poster = computed(() => {
}
}
@media(--small-50) {
.compact-show {
display: flex;
}
.compact-hide {
display: none;
}
.date {
font-size: .9rem;
}
}
@media(--small-60) {
.actors {
grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));

View File

@@ -14,6 +14,7 @@ export async function onBeforeRender(pageContext) {
...pageContext.urlQuery,
scope: pageContext.routeParams.scope || 'latest',
tagSlug: pageContext.routeParams.tagSlug,
tagFilter: pageContext.tagFilter,
}), {
page: Number(pageContext.routeParams.page) || 1,
limit: Number(pageContext.urlParsed.search.limit) || 30,

View File

@@ -1,10 +1,13 @@
import { fetchScenes } from '#/src/scenes.js';
import { curateScenesQuery } from '#/src/web/scenes.js';
export async function onBeforeRender(pageContext) {
const { scenes, limit, total } = await fetchScenes({
const { scenes, limit, total } = await fetchScenes(await curateScenesQuery({
...pageContext.urlQuery,
scope: pageContext.routeParams.scope || 'latest',
isShowcased: true,
}, {
tagFilter: pageContext.tagFilter,
}), {
page: Number(pageContext.routeParams.page) || 1,
limit: Number(pageContext.urlParsed.search.limit) || 30,
aggregate: false,

View File

@@ -20,6 +20,7 @@
<h3 class="heading">Stashes</h3>
<button
v-if="profile.id === user?.id"
class="button"
@click="showStashDialog = true"
>
@@ -79,6 +80,7 @@ import StashTile from '#/components/stashes/tile.vue';
import Dialog from '#/components/dialog/dialog.vue';
const pageContext = inject('pageContext');
const user = pageContext.user;
const profile = ref(pageContext.pageProps.profile);
const stashName = ref(null);