Upgraded dependencies, bumped to Node 24.
This commit is contained in:
@@ -1,3 +1,28 @@
|
||||
<script setup>
|
||||
import { inject, useId } from 'vue';
|
||||
|
||||
import Bio from '#/components/actors/bio.vue';
|
||||
|
||||
import Gender from '#/components/actors/gender.vue';
|
||||
import Domains from '#/components/domains/domains.vue';
|
||||
import Movies from '#/components/movies/movies.vue';
|
||||
import Scenes from '#/components/scenes/scenes.vue';
|
||||
import Heart from '#/components/stashes/heart.vue';
|
||||
import getPath from '#/src/get-path.js';
|
||||
|
||||
const pageContext = inject('pageContext');
|
||||
const { pageProps, routeParams } = pageContext;
|
||||
const { actor } = pageProps;
|
||||
|
||||
const domain = routeParams.domain;
|
||||
|
||||
const badCredits = ['Pierre Woodman']; // consistently horrible photos
|
||||
const photos = actor.photos.filter((photo) => photo.entropy > 5.5 && !badCredits.includes(photo.credit));
|
||||
const aliasTooltipId = useId();
|
||||
|
||||
console.log(actor);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="actor">
|
||||
<div class="actor-header">
|
||||
@@ -5,6 +30,17 @@
|
||||
<span v-if="actor.entity">{{ actor.name }} ({{ actor.entity.name }})</span>
|
||||
<span v-else>{{ actor.name }}</span>
|
||||
|
||||
<a
|
||||
v-if="actor.alias"
|
||||
v-tooltip="{ content: `Alias for ${actor.alias.name} (#${actor.alias.id})`, ariaId: aliasTooltipId }"
|
||||
:href="`/actor/${actor.alias.id}/${actor.alias.slug}`"
|
||||
>
|
||||
<Icon
|
||||
icon="at-sign"
|
||||
class="header-alias"
|
||||
/>
|
||||
</a>
|
||||
|
||||
<Gender
|
||||
:gender="actor.gender"
|
||||
class="header-gender"
|
||||
@@ -61,28 +97,6 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { inject } from 'vue';
|
||||
|
||||
import getPath from '#/src/get-path.js';
|
||||
|
||||
import Bio from '#/components/actors/bio.vue';
|
||||
import Gender from '#/components/actors/gender.vue';
|
||||
import Scenes from '#/components/scenes/scenes.vue';
|
||||
import Movies from '#/components/movies/movies.vue';
|
||||
import Heart from '#/components/stashes/heart.vue';
|
||||
import Domains from '#/components/domains/domains.vue';
|
||||
|
||||
const pageContext = inject('pageContext');
|
||||
const { pageProps, routeParams } = pageContext;
|
||||
const { actor } = pageProps;
|
||||
|
||||
const domain = routeParams.domain;
|
||||
|
||||
const badCredits = ['Pierre Woodman']; // consistently horrible photos
|
||||
const photos = actor.photos.filter((photo) => photo.entropy > 5.5 && !badCredits.includes(photo.credit));
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.actor {
|
||||
display: flex;
|
||||
@@ -111,6 +125,14 @@ const photos = actor.photos.filter((photo) => photo.entropy > 5.5 && !badCredits
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.header-alias.icon {
|
||||
height: 1.75rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 1rem;
|
||||
fill: var(--primary);
|
||||
}
|
||||
|
||||
.header-social {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { redirect, render } from 'vike/abort'; /* eslint-disable-line import/extensions */
|
||||
import { redirect, render } from 'vike/abort';
|
||||
|
||||
import { fetchActorsById } from '#/src/actors.js';
|
||||
import { fetchScenes } from '#/src/scenes.js';
|
||||
import { fetchMovies } from '#/src/movies.js';
|
||||
import { curateScenesQuery } from '#/src/web/scenes.js';
|
||||
import { curateMoviesQuery } from '#/src/web/movies.js';
|
||||
import { getCampaignIndex, getRandomCampaigns } from '#/src/campaigns.js';
|
||||
import { fetchCountries } from '#/src/countries.js';
|
||||
import { getRandomCampaigns, getCampaignIndex } from '#/src/campaigns.js';
|
||||
import { fetchMovies } from '#/src/movies.js';
|
||||
import { fetchScenes } from '#/src/scenes.js';
|
||||
import { curateMoviesQuery } from '#/src/web/movies.js';
|
||||
import { curateScenesQuery } from '#/src/web/scenes.js';
|
||||
|
||||
async function fetchReleases(pageContext) {
|
||||
if (pageContext.routeParams.domain === 'movies') {
|
||||
@@ -47,10 +47,6 @@ export async function onBeforeRender(pageContext) {
|
||||
throw render(404, `Cannot find actor '${pageContext.routeParams.actorId}'.`);
|
||||
}
|
||||
|
||||
if (actor.alias && !Object.hasOwn(pageContext.urlParsed.search, 'inspect')) {
|
||||
throw redirect(`/actor/${actor.alias.id}/${actor.alias.slug}`);
|
||||
}
|
||||
|
||||
const [actorReleases, campaigns, countries] = await Promise.all([
|
||||
fetchReleases(pageContext),
|
||||
getRandomCampaigns([
|
||||
@@ -63,6 +59,10 @@ export async function onBeforeRender(pageContext) {
|
||||
isEditing && fetchCountries(),
|
||||
]);
|
||||
|
||||
if (actor.alias && actorReleases.length === 0 && !Object.hasOwn(pageContext.urlParsed.search, 'inspect')) {
|
||||
throw redirect(`/actor/${actor.alias.id}/${actor.alias.slug}`);
|
||||
}
|
||||
|
||||
const campaignIndex = getCampaignIndex(actorReleases.limit);
|
||||
const [paginationCampaign, sceneCampaign] = campaigns;
|
||||
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
<script setup>
|
||||
import { inject } from 'vue';
|
||||
|
||||
import Revisions from '#/components/edit/revisions.vue';
|
||||
|
||||
const pageContext = inject('pageContext');
|
||||
const actor = pageContext.pageProps.actor;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="content">
|
||||
<div class="revs-header">
|
||||
@@ -21,15 +30,6 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { inject } from 'vue';
|
||||
|
||||
import Revisions from '#/components/edit/revisions.vue';
|
||||
|
||||
const pageContext = inject('pageContext');
|
||||
const actor = pageContext.pageProps.actor;
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.content {
|
||||
padding: 1rem;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { fetchActorsById, fetchActorRevisions } from '#/src/actors.js';
|
||||
import { fetchActorRevisions, fetchActorsById } from '#/src/actors.js';
|
||||
|
||||
export async function onBeforeRender(pageContext) {
|
||||
const [actor] = await fetchActorsById([Number(pageContext.routeParams.actorId)], {}, pageContext.user);
|
||||
|
||||
Reference in New Issue
Block a user