Compare commits

..
8 Commits
10 changed files with 117 additions and 21 deletions
+1 -1
Submodule common updated: ec0812ad9d...7df69021ea
+14 -3
View File
@@ -135,13 +135,18 @@ const aliases = Object
<dfn class="bio-label"><Icon icon="cake" />Date of birth</dfn> <dfn class="bio-label"><Icon icon="cake" />Date of birth</dfn>
<span class="birthdate"> <span class="birthdate">
<template v-if="actor.dateOfBirthPrecision === 'day'">
<span class="birthdate-long">{{ formatDate(actor.dateOfBirth, actor.dateOfBirth.getFullYear() > 1 ? 'MMMM d, yyyy' : 'MMMM d') }}</span> <span class="birthdate-long">{{ formatDate(actor.dateOfBirth, actor.dateOfBirth.getFullYear() > 1 ? 'MMMM d, yyyy' : 'MMMM d') }}</span>
<span class="birthdate-short">{{ formatDate(actor.dateOfBirth, actor.dateOfBirth.getFullYear() > 1 ? 'MMM d, yyyy' : 'MMM d') }}</span> <span class="birthdate-short">{{ formatDate(actor.dateOfBirth, actor.dateOfBirth.getFullYear() > 1 ? 'MMM d, yyyy' : 'MMM d') }}</span>
</template>
<span v-else-if="actor.dateOfBirthPrecision === 'month'">{{ formatDate(actor.dateOfBirth, 'MMMM, yyyy') }}</span>
<span v-else-if="actor.dateOfBirth.getFullYear() > 1">{{ formatDate(actor.dateOfBirth, 'yyyy') }}</span>
<span <span
v-if="!actor.dateOfDeath && actor.dateOfBirth.getFullYear() > 1" v-if="!actor.dateOfDeath && actor.dateOfBirth.getFullYear() > 1"
class="age" class="age"
>{{ actor.ageFromBirth }}</span> ><template v-if="actor.ageFromBirthIsApproximate">~</template>{{ actor.ageFromBirth }}</span>
</span> </span>
</li> </li>
@@ -163,10 +168,16 @@ const aliases = Object
> >
<dfn class="bio-label"><Icon icon="tombstone" />Date of death</dfn> <dfn class="bio-label"><Icon icon="tombstone" />Date of death</dfn>
<span class="birthdate">{{ formatDate(actor.dateOfDeath, 'MMMM d, yyyy') }}<span <span class="birthdate">
<span v-if="actor.dateOfDeathPrecision === 'day'">{{ formatDate(actor.dateOfDeath, 'MMMM d, yyyy') }}</span>
<span v-else-if="actor.dateOfDeathPrecision === 'month'">{{ formatDate(actor.dateOfDeath, 'MMMM, yyyy') }}</span>
<span v-else>{{ formatDate(actor.dateOfDeath, 'yyyy') }}</span>
<span
v-if="actor.ageAtDeath" v-if="actor.ageAtDeath"
class="age" class="age"
>{{ actor.ageAtDeath }}</span></span> ><template v-if="actor.ageAtDeathIsApproximate">~</template>{{ actor.ageAtDeath }}</span>
</span>
</li> </li>
<li <li
+18 -2
View File
@@ -10,7 +10,10 @@ defineProps({
</script> </script>
<template> <template>
<div class="serie-tile"> <div
class="serie-tile"
:class="{ noposter: !serie.poster }"
>
<a <a
v-if="serie.poster" v-if="serie.poster"
:href="`/serie/${serie.id}/${serie.slug}`" :href="`/serie/${serie.id}/${serie.slug}`"
@@ -39,8 +42,8 @@ defineProps({
flex-direction: column; flex-direction: column;
box-shadow: 0 0 3px var(--shadow-weak-30); box-shadow: 0 0 3px var(--shadow-weak-30);
border-radius: .25rem; border-radius: .25rem;
overflow: hidden;
background: var(--background-base); background: var(--background-base);
overflow: hidden;
&:hover { &:hover {
box-shadow: 0 0 3px var(--shadow-weak-20); box-shadow: 0 0 3px var(--shadow-weak-20);
@@ -53,6 +56,19 @@ defineProps({
&.unstashed { &.unstashed {
opacity: .5; opacity: .5;
} }
&.noposter {
background: none;
box-shadow: none;
.title {
padding: 0;
&:hover {
color: var(--primary);
}
}
}
} }
.poster-container { .poster-container {
+1
View File
@@ -206,6 +206,7 @@ module.exports = {
crontab: '*/10 * * * *', // every 10 minutes crontab: '*/10 * * * *', // every 10 minutes
}, },
alerts: { alerts: {
enabled: true,
crontab: '*/10 * * * *', // every 10 minutes crontab: '*/10 * * * *', // every 10 minutes
seenExpiry: 30, // days seenExpiry: 30, // days
finalExpiry: 365, // days finalExpiry: 365, // days
+2 -2
View File
@@ -1,11 +1,11 @@
{ {
"name": "traxxx-web", "name": "traxxx-web",
"version": "0.57.21", "version": "0.57.25",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"version": "0.57.21", "version": "0.57.25",
"dependencies": { "dependencies": {
"@brillout/json-serializer": "^0.5.25", "@brillout/json-serializer": "^0.5.25",
"@dicebear/collection": "7.0.5", "@dicebear/collection": "7.0.5",
+1 -1
View File
@@ -92,7 +92,7 @@
"overrides": { "overrides": {
"vite": "$vite" "vite": "$vite"
}, },
"version": "0.57.21", "version": "0.57.25",
"imports": { "imports": {
"#/*": "./*.js" "#/*": "./*.js"
}, },
+41 -2
View File
@@ -52,9 +52,12 @@ const fields = computed(() => [
key: 'dateOfBirth', key: 'dateOfBirth',
label: 'date of birth', label: 'date of birth',
type: 'date', type: 'date',
value: actor.value?.dateOfBirth value: {
date: actor.value?.dateOfBirth
? format(actor.value.dateOfBirth, 'yyyy-MM-dd') ? format(actor.value.dateOfBirth, 'yyyy-MM-dd')
: null, : null,
precision: actor.value.dateOfBirthPrecision,
},
inline: true, inline: true,
}, },
{ {
@@ -212,9 +215,12 @@ const fields = computed(() => [
key: 'dateOfDeath', key: 'dateOfDeath',
label: 'date of death', label: 'date of death',
type: 'date', type: 'date',
value: actor.value?.dateOfDeath value: {
date: actor.value?.dateOfDeath
? format(actor.value.dateOfDeath, 'yyyy-MM-dd') ? format(actor.value.dateOfDeath, 'yyyy-MM-dd')
: null, : null,
precision: actor.value.dateOfDeathPrecision,
},
}, },
{ {
key: 'allowGlobalMatch', key: 'allowGlobalMatch',
@@ -270,6 +276,14 @@ const keyMap = {
country: 'residenceCountry', country: 'residenceCountry',
place: 'residencePlace', place: 'residencePlace',
}, },
dateOfBirth: {
date: 'dateOfBirth',
precision: 'dateOfBirthPrecision',
},
dateOfDeath: {
date: 'dateOfDeath',
precision: 'dateOfDeathPrecision',
},
tattoos: { tattoos: {
has: 'hasTattoos', has: 'hasTattoos',
description: 'tattoos', description: 'tattoos',
@@ -501,6 +515,7 @@ async function submit() {
>{{ item.unit }} >{{ item.unit }}
</template> </template>
<!--
<input <input
v-if="item.type === 'date'" v-if="item.type === 'date'"
v-model="edits[item.key]" v-model="edits[item.key]"
@@ -508,6 +523,30 @@ async function submit() {
class="date input" class="date input"
:disabled="!editing.has(item.key)" :disabled="!editing.has(item.key)"
> >
-->
<div
v-if="item.type === 'date'"
class="date"
>
<input
v-model="edits[item.key].date"
type="date"
class="date input"
:disabled="!editing.has(item.key)"
>
<select
v-if="item.value.precision"
v-model="edits[item.key].precision"
class="input"
:disabled="!editing.has(item.key)"
>
<option value="day">Day</option>
<option value="month">Month</option>
<option value="year">Year</option>
</select>
</div>
<select <select
v-if="item.type === 'select'" v-if="item.type === 'select'"
+28
View File
@@ -32,7 +32,9 @@ const mj = new MerkleJson();
const keyMap = { const keyMap = {
avatar: 'avatar_media_id', avatar: 'avatar_media_id',
dateOfBirth: 'date_of_birth', dateOfBirth: 'date_of_birth',
dateOfBirthPrecision: 'date_of_birth_precision',
dateOfDeath: 'date_of_death', dateOfDeath: 'date_of_death',
dateOfDeathPrecision: 'date_of_death_precision',
originCountry: 'birth_country_alpha2', originCountry: 'birth_country_alpha2',
originState: 'birth_state', originState: 'birth_state',
originCity: 'birth_city', originCity: 'birth_city',
@@ -62,6 +64,24 @@ const keyMap = {
const socialsOrder = ['onlyfans', 'fansly', 'twitter', 'instagram', 'loyalfans', 'manyvids', 'pornhub', 'linktree', null]; const socialsOrder = ['onlyfans', 'fansly', 'twitter', 'instagram', 'loyalfans', 'manyvids', 'pornhub', 'linktree', null];
// with month (but not day) precision on either side, the age is still certain unless both dates fall in the same month,
// since only then could the unknown day(s) put the birthday on either side of the reference date
function isAgeApproximate(baseDate, basePrecision, referenceDate, referencePrecision = 'day') {
if (!baseDate || !referenceDate) {
return false;
}
if (basePrecision === 'year' || referencePrecision === 'year') {
return true;
}
if (basePrecision === 'day' && referencePrecision === 'day') {
return false;
}
return baseDate.getMonth() === referenceDate.getMonth();
}
export function curateActor(actor, context = {}) { export function curateActor(actor, context = {}) {
if (!actor) { if (!actor) {
return null; return null;
@@ -97,14 +117,20 @@ export function curateActor(actor, context = {}) {
ageFromBirth: actor.date_of_birth && actor.date_of_birth.getFullYear() > 1 ageFromBirth: actor.date_of_birth && actor.date_of_birth.getFullYear() > 1
? differenceInYears(Date.now(), actor.date_of_birth) ? differenceInYears(Date.now(), actor.date_of_birth)
: null, : null,
ageFromBirthIsApproximate: actor.date_of_birth_precision !== 'day'
&& isAgeApproximate(actor.date_of_birth, actor.date_of_birth_precision, new Date()),
ageAtDeath: actor.date_of_birth && actor.date_of_death && actor.date_of_birth.getFullYear() > 1 ageAtDeath: actor.date_of_birth && actor.date_of_death && actor.date_of_birth.getFullYear() > 1
? differenceInYears(actor.date_of_death, actor.date_of_birth) ? differenceInYears(actor.date_of_death, actor.date_of_birth)
: null, : null,
ageAtDeathIsApproximate: (actor.date_of_birth_precision !== 'day' || actor.date_of_death_precision !== 'day')
&& isAgeApproximate(actor.date_of_birth, actor.date_of_birth_precision, actor.date_of_death, actor.date_of_death_precision),
ageThen: context.sceneDate && actor.date_of_birth && actor.date_of_birth.getFullYear() > 1 ageThen: context.sceneDate && actor.date_of_birth && actor.date_of_birth.getFullYear() > 1
? differenceInYears(context.sceneDate, actor.date_of_birth) ? differenceInYears(context.sceneDate, actor.date_of_birth)
: null, : null,
dateOfBirth: actor.date_of_birth, dateOfBirth: actor.date_of_birth,
dateOfBirthPrecision: actor.date_of_birth_precision,
dateOfDeath: actor.date_of_death, dateOfDeath: actor.date_of_death,
dateOfDeathPrecision: actor.date_of_death_precision,
bust: actor.bust, bust: actor.bust,
cup: actor.cup, cup: actor.cup,
waist: actor.waist, waist: actor.waist,
@@ -1185,7 +1211,9 @@ async function applyActorRevision(revisionIds, reqUser) {
'gender', 'gender',
'avatar', 'avatar',
'dateOfBirth', 'dateOfBirth',
'dateOfBirthPrecision',
'dateOfDeath', 'dateOfDeath',
'dateOfDeathPrecision',
'originCountry', 'originCountry',
'originState', 'originState',
'originCity', 'originCity',
+1 -1
View File
@@ -127,7 +127,7 @@ function curateScene(rawScene, assets, reqUser, context) {
title: serie.title, title: serie.title,
poster: context.restriction poster: context.restriction
? null ? null
: (serie.serie_poster, { type: 'poster' }), : curateMedia(serie.serie_poster, { type: 'poster' }),
})), })),
poster: curateMedia(assets.poster, { type: 'poster' }), poster: curateMedia(assets.poster, { type: 'poster' }),
photos: assets.photos?.map((photo) => curateMedia(photo, { type: 'photo' })) || [], photos: assets.photos?.map((photo) => curateMedia(photo, { type: 'photo' })) || [],
+2 -1
View File
@@ -164,9 +164,10 @@ export const scenesSchema = `
type Chapter { type Chapter {
id: Int! id: Int!
time: Int! time: Int
tags: [Tag!]! tags: [Tag!]!
date: Date date: Date
duration: Int
description: String description: String
title: String title: String
poster: Media poster: Media