Added actors and movies to global search results.
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<Scenes
|
||||
:show-filters="false"
|
||||
:show-meta="false"
|
||||
:show-scope-tabs="true"
|
||||
:show-filters="!!query"
|
||||
:show-meta="!!query"
|
||||
:show-scope-tabs="!query"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { inject } from 'vue';
|
||||
|
||||
import Scenes from '#/components/scenes/scenes.vue';
|
||||
|
||||
const pageContext = inject('pageContext');
|
||||
const query = Object.hasOwn(pageContext.urlParsed.search, 'q');
|
||||
</script>
|
||||
|
||||
@@ -2,15 +2,24 @@ import { fetchScenes } from '#/src/scenes.js';
|
||||
import { curateScenesQuery } from '#/src/web/scenes.js';
|
||||
|
||||
export async function onBeforeRender(pageContext) {
|
||||
const { scenes, limit, total } = await fetchScenes(await curateScenesQuery({
|
||||
const withQuery = Object.hasOwn(pageContext.urlParsed.search, 'q');
|
||||
|
||||
const {
|
||||
scenes,
|
||||
aggTags,
|
||||
aggChannels,
|
||||
aggActors,
|
||||
limit,
|
||||
total,
|
||||
} = await fetchScenes(await curateScenesQuery({
|
||||
...pageContext.urlQuery,
|
||||
scope: pageContext.routeParams.scope || 'latest',
|
||||
isShowcased: true,
|
||||
isShowcased: withQuery ? null : true,
|
||||
tagFilter: pageContext.tagFilter,
|
||||
}), {
|
||||
page: Number(pageContext.routeParams.page) || 1,
|
||||
limit: Number(pageContext.urlParsed.search.limit) || 30,
|
||||
aggregate: false,
|
||||
aggregate: withQuery,
|
||||
}, pageContext.user);
|
||||
|
||||
return {
|
||||
@@ -18,6 +27,9 @@ export async function onBeforeRender(pageContext) {
|
||||
title: pageContext.routeParams.scope,
|
||||
pageProps: {
|
||||
scenes,
|
||||
aggTags,
|
||||
aggChannels,
|
||||
aggActors,
|
||||
limit,
|
||||
total,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user