Compare commits

...
12 Commits
13 changed files with 130 additions and 25 deletions
+1 -1
Submodule common updated: ec0812ad9d...7df69021ea
+18 -7
View File
@@ -135,13 +135,18 @@ const aliases = Object
<dfn class="bio-label"><Icon icon="cake" />Date of birth</dfn>
<span class="birthdate">
<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>
<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-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
v-if="!actor.dateOfDeath && actor.dateOfBirth.getFullYear() > 1"
class="age"
>{{ actor.ageFromBirth }}</span>
><template v-if="actor.ageFromBirthIsApproximate">~</template>{{ actor.ageFromBirth }}</span>
</span>
</li>
@@ -163,10 +168,16 @@ const aliases = Object
>
<dfn class="bio-label"><Icon icon="tombstone" />Date of death</dfn>
<span class="birthdate">{{ formatDate(actor.dateOfDeath, 'MMMM d, yyyy') }}<span
v-if="actor.ageAtDeath"
class="age"
>{{ actor.ageAtDeath }}</span></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"
class="age"
><template v-if="actor.ageAtDeathIsApproximate">~</template>{{ actor.ageAtDeath }}</span>
</span>
</li>
<li
+5 -2
View File
@@ -225,7 +225,10 @@ async function banEditor(revision) {
<div
class="revs-header"
>
<span class="revs-total">{{ total }} revisions</span>
<span
v-if="typeof total === 'number'"
class="revs-total"
>{{ total }} revisions</span>
<Checkbox
v-if="context === 'admin'"
@@ -477,7 +480,7 @@ async function banEditor(revision) {
}
.revs-total {
color: var(--shadow-strong-10);
color: var(--glass-strong-10);
}
.revs {
+18 -2
View File
@@ -10,7 +10,10 @@ defineProps({
</script>
<template>
<div class="serie-tile">
<div
class="serie-tile"
:class="{ noposter: !serie.poster }"
>
<a
v-if="serie.poster"
:href="`/serie/${serie.id}/${serie.slug}`"
@@ -39,8 +42,8 @@ defineProps({
flex-direction: column;
box-shadow: 0 0 3px var(--shadow-weak-30);
border-radius: .25rem;
overflow: hidden;
background: var(--background-base);
overflow: hidden;
&:hover {
box-shadow: 0 0 3px var(--shadow-weak-20);
@@ -53,6 +56,19 @@ defineProps({
&.unstashed {
opacity: .5;
}
&.noposter {
background: none;
box-shadow: none;
.title {
padding: 0;
&:hover {
color: var(--primary);
}
}
}
}
.poster-container {
+1
View File
@@ -206,6 +206,7 @@ module.exports = {
crontab: '*/10 * * * *', // every 10 minutes
},
alerts: {
enabled: true,
crontab: '*/10 * * * *', // every 10 minutes
seenExpiry: 30, // days
finalExpiry: 365, // days
+2 -2
View File
@@ -1,11 +1,11 @@
{
"name": "traxxx-web",
"version": "0.57.19",
"version": "0.57.25",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"version": "0.57.19",
"version": "0.57.25",
"dependencies": {
"@brillout/json-serializer": "^0.5.25",
"@dicebear/collection": "7.0.5",
+1 -1
View File
@@ -92,7 +92,7 @@
"overrides": {
"vite": "$vite"
},
"version": "0.57.19",
"version": "0.57.25",
"imports": {
"#/*": "./*.js"
},
@@ -5,11 +5,13 @@ export async function onBeforeRender(pageContext) {
const {
revisions,
total: revisionTotal,
avatars,
} = await fetchActorRevisions(null, {
actorId: actor.id,
isFinalized: true,
limit: 100,
limit: Number(pageContext.urlParsed.search.limit) || 100,
page: Number(pageContext.routeParams.page) || 1,
}, pageContext.user);
return {
@@ -18,6 +20,7 @@ export async function onBeforeRender(pageContext) {
pageProps: {
actor,
revisions,
revisionTotal,
avatars,
},
},
+45 -6
View File
@@ -52,9 +52,12 @@ const fields = computed(() => [
key: 'dateOfBirth',
label: 'date of birth',
type: 'date',
value: actor.value?.dateOfBirth
? format(actor.value.dateOfBirth, 'yyyy-MM-dd')
: null,
value: {
date: actor.value?.dateOfBirth
? format(actor.value.dateOfBirth, 'yyyy-MM-dd')
: null,
precision: actor.value.dateOfBirthPrecision,
},
inline: true,
},
{
@@ -212,9 +215,12 @@ const fields = computed(() => [
key: 'dateOfDeath',
label: 'date of death',
type: 'date',
value: actor.value?.dateOfDeath
? format(actor.value.dateOfDeath, 'yyyy-MM-dd')
: null,
value: {
date: actor.value?.dateOfDeath
? format(actor.value.dateOfDeath, 'yyyy-MM-dd')
: null,
precision: actor.value.dateOfDeathPrecision,
},
},
{
key: 'allowGlobalMatch',
@@ -270,6 +276,14 @@ const keyMap = {
country: 'residenceCountry',
place: 'residencePlace',
},
dateOfBirth: {
date: 'dateOfBirth',
precision: 'dateOfBirthPrecision',
},
dateOfDeath: {
date: 'dateOfDeath',
precision: 'dateOfDeathPrecision',
},
tattoos: {
has: 'hasTattoos',
description: 'tattoos',
@@ -501,6 +515,7 @@ async function submit() {
>{{ item.unit }}
</template>
<!--
<input
v-if="item.type === 'date'"
v-model="edits[item.key]"
@@ -508,6 +523,30 @@ async function submit() {
class="date input"
: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
v-if="item.type === 'select'"
@@ -10,13 +10,15 @@ export async function onBeforeRender(pageContext) {
const {
revisions,
total: revisionTotal,
actors,
tags,
movies,
} = await fetchSceneRevisions(null, {
sceneId: scene.id,
isFinalized: true,
limit: 100,
limit: Number(pageContext.urlParsed.search.limit) || 100,
page: Number(pageContext.routeParams.page) || 1,
}, pageContext.user);
return {
@@ -25,6 +27,7 @@ export async function onBeforeRender(pageContext) {
pageProps: {
scene,
revisions,
revisionTotal,
actors,
tags,
movies,
+28
View File
@@ -32,7 +32,9 @@ const mj = new MerkleJson();
const keyMap = {
avatar: 'avatar_media_id',
dateOfBirth: 'date_of_birth',
dateOfBirthPrecision: 'date_of_birth_precision',
dateOfDeath: 'date_of_death',
dateOfDeathPrecision: 'date_of_death_precision',
originCountry: 'birth_country_alpha2',
originState: 'birth_state',
originCity: 'birth_city',
@@ -62,6 +64,24 @@ const keyMap = {
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 = {}) {
if (!actor) {
return null;
@@ -97,14 +117,20 @@ export function curateActor(actor, context = {}) {
ageFromBirth: actor.date_of_birth && actor.date_of_birth.getFullYear() > 1
? differenceInYears(Date.now(), actor.date_of_birth)
: 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
? differenceInYears(actor.date_of_death, actor.date_of_birth)
: 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
? differenceInYears(context.sceneDate, actor.date_of_birth)
: null,
dateOfBirth: actor.date_of_birth,
dateOfBirthPrecision: actor.date_of_birth_precision,
dateOfDeath: actor.date_of_death,
dateOfDeathPrecision: actor.date_of_death_precision,
bust: actor.bust,
cup: actor.cup,
waist: actor.waist,
@@ -1185,7 +1211,9 @@ async function applyActorRevision(revisionIds, reqUser) {
'gender',
'avatar',
'dateOfBirth',
'dateOfBirthPrecision',
'dateOfDeath',
'dateOfDeathPrecision',
'originCountry',
'originState',
'originCity',
+1 -1
View File
@@ -127,7 +127,7 @@ function curateScene(rawScene, assets, reqUser, context) {
title: serie.title,
poster: context.restriction
? null
: (serie.serie_poster, { type: 'poster' }),
: curateMedia(serie.serie_poster, { type: 'poster' }),
})),
poster: curateMedia(assets.poster, { type: 'poster' }),
photos: assets.photos?.map((photo) => curateMedia(photo, { type: 'photo' })) || [],
+2 -1
View File
@@ -164,9 +164,10 @@ export const scenesSchema = `
type Chapter {
id: Int!
time: Int!
time: Int
tags: [Tag!]!
date: Date
duration: Int
description: String
title: String
poster: Media