Added actors and movies to global search results.

This commit is contained in:
2024-06-02 05:22:08 +02:00
parent b144728e5f
commit 5b4aa9644b
13 changed files with 284 additions and 65 deletions

View File

@@ -135,7 +135,7 @@ const cupRange = ref(pageProps.cupRange);
actors.value = pageProps.actors;
const currentPage = ref(Number(routeParams.page));
const total = ref(Number(pageProps.total));
const total = ref(Number(pageProps.actorTotal || pageProps.total));
const order = ref(routeParams.order || urlParsed.search.order || 'likes.desc');
const filters = ref({

View File

@@ -5,8 +5,6 @@
unstashed: !favorited && pageStash && user && pageStash.user.id === user?.id,
}"
>
<span class="name">{{ actor.name }}</span>
<div class="avatar-container">
<Link
:href="`/actor/${actor.id}/${actor.slug}`"
@@ -36,37 +34,39 @@
@stashed="(stash) => { favorited = stash.id === currentStash.id ? true : favorited; }"
@unstashed="(stash) => { favorited = stash.id === currentStash.id ? false : favorited; }"
/>
</div>
<div class="details">
<span class="birth">
<Gender :gender="actor.gender" />
<div class="details">
<span class="birth">
<Gender :gender="actor.gender" />
<span
v-if="actor.ageFromBirth"
:title="`Born ${formatDate(actor.dateOfBirth, 'MMMM d, yyyy')}`"
class="age"
>{{ actor.ageFromBirth }}</span>
<span
v-if="actor.ageThen && actor.ageThen < actor.ageFromBirth"
title="Age on date of release"
class="age age-then"
>{{ actor.ageThen }}</span>
</span>
<span
v-if="actor.ageFromBirth"
:title="`Born ${formatDate(actor.dateOfBirth, 'MMMM d, yyyy')}`"
class="age"
>{{ actor.ageFromBirth }}</span>
<span
v-if="actor.ageThen && actor.ageThen < actor.ageFromBirth"
title="Age on date of release"
class="age age-then"
>{{ actor.ageThen }}</span>
</span>
<span
v-if="actor.origin?.country"
:title="`Born in ${actor.origin.country.alias || actor.origin.country.name}`"
class="country"
>
{{ actor.origin.country.alpha2 }}
<img
:src="`/img/flags/${actor.origin.country.alpha2.toLowerCase()}.svg`"
class="flag"
v-if="actor.origin?.country"
:title="`Born in ${actor.origin.country.alias || actor.origin.country.name}`"
class="country"
>
</span>
{{ actor.origin.country.alpha2 }}
<img
:src="`/img/flags/${actor.origin.country.alpha2.toLowerCase()}.svg`"
class="flag"
>
</span>
</div>
</div>
<span class="name">{{ actor.name }}</span>
</div>
</template>
@@ -99,8 +99,8 @@ const favorited = ref(props.actor.stashes.some((actorStash) => actorStash.id ===
display: flex;
flex-direction: column;
width: 100%;
aspect-ratio: 2/3;
position: relative;
aspect-ratio: 3/5;
border-radius: .25rem;
box-shadow: 0 0 3px var(--shadow-weak-30);
overflow: hidden;
@@ -108,10 +108,6 @@ const favorited = ref(props.actor.stashes.some((actorStash) => actorStash.id ===
&:hover {
box-shadow: 0 0 3px var(--shadow-weak-20);
.name {
color: var(--primary);
}
:deep(.bookmarks) .icon:not(.favorited):not(:hover) {
fill: var(--text-light);
}
@@ -124,7 +120,7 @@ const favorited = ref(props.actor.stashes.some((actorStash) => actorStash.id ===
.name {
flex-shrink: 0;
padding: .25rem .5rem;
padding: .35rem .5rem;
font-weight: bold;
font-size: .9rem;
white-space: nowrap;