Compare commits

...
28 Commits
Author SHA1 Message Date
DebaucheryLibrarian 10ac366e87 0.57.25 2026-09-22 02:22:21 +02:00
DebaucheryLibrarian a5e06b51ea Fixed scene serie poster curation and tile display. 2026-09-22 02:22:19 +02:00
DebaucheryLibrarian b3dcb65871 0.57.24 2026-09-22 00:54:23 +02:00
DebaucheryLibrarian 4527bf2495 Fixed alerts cron never initializing due missing config. 2026-09-22 00:54:22 +02:00
DebaucheryLibrarian 6c0e4d5456 0.57.23 2026-09-20 19:11:32 +02:00
DebaucheryLibrarian 8dd136446d Changed Chapter GraphQL type to accommodate video-type chapters without a starting time. 2026-09-20 19:11:30 +02:00
DebaucheryLibrarian 1cc94d665a 0.57.22 2026-09-18 23:25:51 +02:00
DebaucheryLibrarian a9d9b7623d Added actor date of birth and death precision. 2026-09-18 23:25:49 +02:00
DebaucheryLibrarian 83c0f1e4c6 0.57.21 2026-09-18 16:11:29 +02:00
DebaucheryLibrarian 64b92536d5 Fixed dark theme text color for revision count. 2026-09-18 16:11:27 +02:00
DebaucheryLibrarian cea5b98bda 0.57.20 2026-09-18 03:37:06 +02:00
DebaucheryLibrarian 411cde7cf9 Extended revision pagination to scene and actor pages, fixes 'revisions' label without count. 2026-09-18 03:37:03 +02:00
DebaucheryLibrarian 73d65ae873 0.57.19 2026-09-18 03:31:32 +02:00
DebaucheryLibrarian b5e9886b9b Added pagination and total to revisions. 2026-09-18 03:31:28 +02:00
DebaucheryLibrarian cd10f14285 0.57.18 2026-09-17 02:17:34 +02:00
DebaucheryLibrarian 514ed235a4 Added a default og:description. 2026-09-17 02:17:32 +02:00
DebaucheryLibrarian 00c6d17aaa 0.57.17 2026-09-17 01:17:06 +02:00
DebaucheryLibrarian de0b1c2baf Added scene chapters to GraphQL. Verifying API credential types. 2026-09-17 01:17:03 +02:00
DebaucheryLibrarian e9b7bb03d0 0.57.16 2026-08-17 00:06:56 +02:00
DebaucheryLibrarian 1e7207160c Fixed alert stash not syncing to manticore. 2026-08-17 00:06:53 +02:00
DebaucheryLibrarian 37a919770a 0.57.15 2026-07-28 23:46:12 +02:00
DebaucheryLibrarian 4e59994806 Fixed notify stash manticoresearch call still using obsolete 'index' key. 2026-07-28 23:46:10 +02:00
DebaucheryLibrarian 699f7f0944 0.57.14 2026-07-26 03:40:37 +02:00
DebaucheryLibrarian bf220f6b4e Added stash archiving. 2026-07-26 03:40:32 +02:00
DebaucheryLibrarian 02ee99d52f 0.57.13 2026-07-26 03:15:52 +02:00
DebaucheryLibrarian e50dedca66 Fixed profile page breaking when logged out. 2026-07-26 03:15:50 +02:00
DebaucheryLibrarian 760025f414 0.57.12 2026-07-26 00:26:51 +02:00
DebaucheryLibrarian 07d9dfaaaa Added stash sorting to stash tooltip menu and profile page. 2026-07-26 00:26:49 +02:00
37 changed files with 599 additions and 60 deletions
+1 -1
View File
@@ -87,7 +87,7 @@
}
.v-popper__popper[data-popper-placement^="top"] .v-popper__arrow-container {
bottom: -7px;
bottom: -6px;
}
.v-popper__popper[data-popper-placement^="top"] .v-popper__arrow-inner,
+5
View File
@@ -0,0 +1,5 @@
<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path d="M15.89 10.188l-4-5c-0.172-0.216-0.487-0.251-0.703-0.078s-0.251 0.487-0.078 0.703l3.89 4.863v0.325h-3.5l-2 2h-3l-2-2h-3.5v-0.325l3.89-4.863c0.173-0.216 0.138-0.53-0.078-0.703s-0.53-0.138-0.703 0.078l-4 5c-0.071 0.089-0.11 0.199-0.11 0.312v4.5c0 0.552 0.448 1 1 1h14c0.552 0 1-0.448 1-1v-4.5c0-0.114-0.039-0.224-0.11-0.312z"></path>
<path d="M8 0.5l-3.5 3.5h2.5v5h2v-5h2.5z"></path>
</svg>

After

Width:  |  Height:  |  Size: 528 B

+18
View File
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg3"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs3" /><path
d="M5 12v-12h-2v12h-2.5l3.5 3.5 3.5-3.5h-2.5z"
id="path1" /><path
id="path1-3"
style="stroke-width:0.348033"
d="M 10.443359 2.2773438 C 10.354073 2.2861032 10.283203 2.3587981 10.283203 2.4472656 L 10.283203 4.328125 L 8.3339844 4.328125 C 8.2362054 4.328125 8.1582031 4.4056346 8.1582031 4.5 L 8.1582031 5.5253906 C 8.1582031 5.6197556 8.2362047 5.6953125 8.3339844 5.6953125 L 10.283203 5.6953125 L 10.283203 7.5292969 L 11.556641 6.46875 A 0.14617623 0.14617623 0 0 0 11.556641 6.4667969 C 11.601003 6.4299705 11.650097 6.3991617 11.701172 6.375 L 11.701172 5.6953125 L 13.648438 5.6953125 C 13.746218 5.6953125 13.826172 5.619755 13.826172 5.5253906 L 13.826172 4.5 C 13.826172 4.405635 13.746225 4.328125 13.648438 4.328125 L 11.701172 4.328125 L 11.701172 2.4472656 C 11.701172 2.3529006 11.621224 2.2773437 11.523438 2.2773438 L 10.460938 2.2773438 C 10.454826 2.2773438 10.449312 2.2767598 10.443359 2.2773438 z " /><path
d="M 16,5 C 16,2.243 13.757,0 11,0 8.243,0 6,2.243 6,5 V 5.5 C 6,5.776 6.224,6 6.5,6 6.776,6 7,5.776 7,5.5 V 5 c 0,-2.206 1.794,-4 4,-4 2.206,0 4,1.794 4,4 0,1.86 -1.277,3.428 -3,3.873 V 7 L 9,9.5 12,12 V 9.899 C 14.279,9.434 16,7.414 16,5 Z"
id="path3" /></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

+18
View File
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg3"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs3" /><path
d="M5 12v-12h-2v12h-2.5l3.5 3.5 3.5-3.5h-2.5z"
id="path1" /><path
id="path1-3"
style="stroke-width:0.348033"
d="M 10.443359 2.2773438 C 10.354073 2.2861032 10.283203 2.3587981 10.283203 2.4472656 L 10.283203 4.328125 L 8.3339844 4.328125 C 8.2362054 4.328125 8.1582031 4.4056346 8.1582031 4.5 L 8.1582031 5.5253906 C 8.1582031 5.6197556 8.2362047 5.6953125 8.3339844 5.6953125 L 10.283203 5.6953125 L 10.283203 6.3671875 C 10.340222 6.3923929 10.394355 6.4261166 10.443359 6.4667969 A 0.14617623 0.14617623 0 0 1 10.443359 6.46875 L 11.701172 7.5175781 L 11.701172 5.6953125 L 13.648438 5.6953125 C 13.746218 5.6953125 13.826172 5.619755 13.826172 5.5253906 L 13.826172 4.5 C 13.826172 4.405635 13.746225 4.328125 13.648438 4.328125 L 11.701172 4.328125 L 11.701172 2.4472656 C 11.701172 2.3529006 11.621224 2.2773437 11.523438 2.2773438 L 10.460938 2.2773438 C 10.454826 2.2773438 10.449312 2.2767598 10.443359 2.2773438 z " /><path
d="m 6,5 c 0,-2.757 2.243,-5 5,-5 2.757,0 5,2.243 5,5 V 5.5 C 16,5.776 15.776,6 15.5,6 15.224,6 15,5.776 15,5.5 V 5 C 15,2.794 13.206,1 11,1 8.794,1 7,2.794 7,5 7,6.86 8.277,8.428 10,8.873 V 7 L 13,9.5 10,12 V 9.899 C 7.721,9.434 6,7.414 6,5 Z"
id="path3" /></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg3"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs3" /><path
d="M5 12v-12h-2v12h-2.5l3.5 3.5 3.5-3.5h-2.5z"
id="path1" /><path
d="M 14.334849,4.1517112 H 11.883382 V 1.785868 c 0,-0.1187227 -0.09983,-0.2150766 -0.222859,-0.2150766 h -1.337165 c -0.12302,0 -0.222861,0.096353 -0.222861,0.2150766 V 4.1517112 H 7.6490291 c -0.1230181,0 -0.2228598,0.096353 -0.2228598,0.2150768 v 1.2904597 c 0,0.1187229 0.099841,0.2150767 0.2228598,0.2150767 h 2.4514679 v 2.365843 c 0,0.1187227 0.09983,0.2150768 0.222861,0.2150768 h 1.337165 c 0.123019,0 0.222859,-0.096353 0.222859,-0.2150768 v -2.365843 h 2.451467 c 0.12302,0 0.22286,-0.096355 0.22286,-0.2150767 V 4.366788 c 0,-0.1187229 -0.09983,-0.2150768 -0.22286,-0.2150768 z"
id="path1-3"
style="stroke-width:0.437868" /></svg>

After

Width:  |  Height:  |  Size: 1010 B

+38
View File
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg3"
sodipodi:docname="sort-heart.svg"
xml:space="preserve"
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs3" /><sodipodi:namedview
id="namedview3"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="26.077075"
inkscape:cx="4.0265253"
inkscape:cy="4.640091"
inkscape:window-width="1920"
inkscape:window-height="1020"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:current-layer="svg3"
showguides="true" /><path
d="M5 12v-12h-2v12h-2.5l3.5 3.5 3.5-3.5h-2.5z"
id="path1" /><path
d="M 13.78723,0 C 12.941692,0 12.207573,0.47431375 11.834786,1.1709458 11.461999,0.47431375 10.72788,0 9.8823418,0 c -1.2219697,0 -2.21277,0.99080032 -2.21277,2.2127699 0,2.9937477 4.1652142,5.0763547 4.1652142,5.0763547 0,0 4.165214,-2.082607 4.165214,-5.0763547 C 16,0.99080032 15.0092,0 13.78723,0 Z"
id="path1-5"
style="stroke-width:0.520651" /></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

+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
+39 -6
View File
@@ -5,8 +5,10 @@ import { computed, inject, ref } from 'vue';
import Avatar from '#/components/edit/avatar.vue';
import Socials from '#/components/edit/revision-socials.vue';
import Checkbox from '#/components/form/checkbox.vue';
import Pagination from '#/components/pagination/pagination.vue';
import { get, post } from '#/src/api.js';
import navigate from '#/src/navigate.js';
import { formatDuration } from '#/utils/format.js';
defineProps({
@@ -31,10 +33,14 @@ const moviesById = computed(() => Object.fromEntries(movies.value.map((movie) =>
const avatarsById = computed(() => Object.fromEntries(avatars.value.map((avatar) => [avatar.id, avatar])));
const feedbacks = ref({});
const showReviewed = ref(false);
const showReviewed = ref(Object.hasOwn(pageContext.urlParsed.search, 'final'));
const reviewedRevisions = ref(new Set());
const expanded = ref(new Set());
const total = ref(pageContext.pageProps.revisionTotal);
const page = Number(pageContext.routeParams.page) || 1;
const limit = Number(pageContext.urlParsed.search.limit) || 100;
const mappedKeys = {
actors: actorsById,
// tags: tagsById,
@@ -163,7 +169,8 @@ const curatedRevisions = computed(() => revisions.value.map((revision) => {
async function reloadRevisions() {
const updatedRevisions = await get(`/revisions/${domain}`, {
isFinalized: showReviewed.value ? undefined : false,
limit: 50,
page,
limit,
});
actors.value = updatedRevisions.actors;
@@ -171,6 +178,14 @@ async function reloadRevisions() {
movies.value = updatedRevisions.movies;
avatars.value = updatedRevisions.avatars;
revisions.value = updatedRevisions.revisions;
total.value = updatedRevisions.total;
navigate(pageContext.urlParsed.pathname, {
...pageContext.urlParsed.search,
final: showReviewed.value || undefined,
}, {
redirect: false,
});
}
async function reviewRevision(revision, isApproved) {
@@ -208,10 +223,15 @@ async function banEditor(revision) {
<template>
<div class="page">
<div
v-if="context === 'admin'"
class="revs-header"
>
<span
v-if="typeof total === 'number'"
class="revs-total"
>{{ total }} revisions</span>
<Checkbox
v-if="context === 'admin'"
label="Show finalized"
:checked="showReviewed"
@change="(checked) => { showReviewed = checked; reloadRevisions(); }"
@@ -388,13 +408,12 @@ async function banEditor(revision) {
class="rev-compact"
@click="expanded.add(rev.id)"
>
<span class="rev-scene nolink noshrink"><template v-if="context !== 'scene' && context !== 'actor'">{{ rev.sceneId || rev.actorId }}</template>@{{ rev.hash.slice(0, 6) }}</span>
<span
v-if="context !== 'scene'"
class="rev-title nolink ellipsis"
>{{ rev.base.title }}</span>
>{{ rev.base.title || rev.base.name }}</span>
<span class="rev-summary">
<span class="summary-deltas ellipsis">{{ rev.deltas.map((delta) => delta.key).join(', ') }}</span>
@@ -431,6 +450,13 @@ async function banEditor(revision) {
</div>
</li>
</ul>
<Pagination
v-if="total"
:total="total"
:page="page"
:limit="limit"
/>
</div>
</template>
@@ -443,13 +469,20 @@ async function banEditor(revision) {
.revs-header {
display: flex;
margin-bottom: 1rem;
justify-content: space-between;
box-sizing: border-box;
padding: .5rem .5rem .75rem .5rem;
width: 100%;
.check-container {
display: inline-flex;
}
}
.revs-total {
color: var(--glass-strong-10);
}
.revs {
width: 100%;
flex-grow: 1;
+4
View File
@@ -13,6 +13,10 @@ const props = defineProps({
type: Number,
default: null,
},
limit: {
type: Number,
default: null,
},
redirect: {
type: Boolean,
default: true,
+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 {
+2
View File
@@ -261,6 +261,7 @@ async function reloadStashes(newStash) {
<StashMenu
:stashes="stashes"
:item-stashes="itemStashes"
:domain="domain"
@stash="(stash) => stashItem(stash)"
@unstash="(stash) => unstashItem(stash)"
@create="showStashDialog = true"
@@ -318,6 +319,7 @@ async function reloadStashes(newStash) {
<StashMenu
:stashes="stashes"
:item-stashes="itemStashes"
:domain="domain"
@stash="(stash) => stashItem(stash)"
@unstash="(stash) => unstashItem(stash)"
@create="showStashDialog = true"
+108 -12
View File
@@ -1,7 +1,9 @@
<script setup>
import { computed, ref } from 'vue';
import Checkbox from '#/components/form/checkbox.vue';
defineProps({
const props = defineProps({
stashes: {
type: Array,
default: () => [],
@@ -10,16 +12,64 @@ defineProps({
type: Array,
default: () => [],
},
domain: {
type: String,
default: 'scenes',
},
});
const emit = defineEmits(['stash', 'unstash', 'create']);
const sortings = ['used', 'name', 'size', 'created'];
const sorting = ref(localStorage.getItem('stashMenuSorting') || 'used');
const domainKey = {
actors: 'stashedActors',
scenes: 'stashedScenes',
movies: 'stashedMovies',
}[props.domain];
const sortedStashes = computed(() => props.stashes
.filter((stash) => !stash.isArchived)
.toSorted((stashA, stashB) => {
return stashA.createdAt - stashB.createdAt;
})
.toSorted((stashA, stashB) => {
if (sorting.value === 'used') {
return stashB.lastStashAt - stashA.lastStashAt;
}
if (sorting.value === 'name') {
return stashA.name.localeCompare(stashB.name);
}
if (sorting.value === 'size') {
return stashB[domainKey] - stashA[domainKey];
}
if (sorting.value === 'created') {
return stashA.createdAt - stashB.createdAt;
}
return 0;
}));
/*
.toSorted((stashA, stashB) => {
return stashB.isPrimary - stashA.isPrimary;
}));
*/
function toggleSorting() {
sorting.value = sortings[(sortings.indexOf(sorting.value) + 1) % sortings.length];
localStorage.setItem('stashMenuSorting', sorting.value);
}
</script>
<template>
<div class="stash-menu noselect">
<ul class="stash-list nolist noselect">
<li
v-for="userStash in stashes"
v-for="userStash in sortedStashes"
:key="`stash-${userStash.id}`"
class="menu-item"
>
@@ -32,13 +82,47 @@ const emit = defineEmits(['stash', 'unstash', 'create']);
</li>
</ul>
<div
v-close-popper
class="menu-item menu-stash create"
@click="emit('create')"
>
<Icon icon="plus3" />
New
<div class="menu-actions">
<div
v-close-popper
class="menu-item menu-stash menu-create"
@click="emit('create')"
>
<Icon icon="plus3" />
New
</div>
<Icon
v-if="sorting === 'used'"
v-tooltip="'By last stash'"
icon="sort-heart"
class="menu-sort"
@click="toggleSorting"
/>
<Icon
v-if="sorting === 'name'"
v-tooltip="'By name'"
icon="sort-alpha-asc"
class="menu-sort"
@click="toggleSorting"
/>
<Icon
v-if="sorting === 'size'"
v-tooltip="`By total stashed ${domain}`"
icon="sort-amount-desc"
class="menu-sort"
@click="toggleSorting"
/>
<Icon
v-if="sorting === 'created'"
v-tooltip="'By stash age'"
icon="sort-time-asc"
class="menu-sort"
@click="toggleSorting"
/>
</div>
</div>
</template>
@@ -85,10 +169,22 @@ const emit = defineEmits(['stash', 'unstash', 'create']);
.check-container {
margin-right: .5rem;
}
}
&.create {
flex-shrink: 0;
border-top: 1px solid var(--glass-weak-40);
.menu-actions {
flex-shrink: 0;
display: flex;
border-top: solid 1px var(--glass-weak-40);
}
.menu-sort {
padding: .75rem 1rem;
fill: var(--glass);
border-left: solid 1px var(--glass-weak-40);
&:hover {
fill: var(--primary);
cursor: pointer;
}
}
</style>
+121 -3
View File
@@ -1,5 +1,5 @@
<script setup>
import { inject, ref } from 'vue';
import { computed, inject, ref } from 'vue';
import StashDialog from '#/components/stashes/create.vue';
import StashTile from '#/components/stashes/tile.vue';
@@ -13,16 +13,55 @@ const stashes = ref(pageContext.pageProps.stashes);
const profile = ref(pageContext.pageProps.profile);
const showStashDialog = ref(false);
const showArchived = ref(false);
const sortings = ['used', 'name', 'size', 'created'];
const sorting = ref('size');
async function reloadStashes() {
// profile.value = await get(`/users/${profile.value.id}`);
stashes.value = await get(`/users/${profile.value.id}/stashes`);
}
const sortedStashes = computed(() => stashes.value
.toSorted((stashA, stashB) => {
return stashA.createdAt - stashB.createdAt;
})
.toSorted((stashA, stashB) => {
if (sorting.value === 'used') {
return stashB.lastStashAt - stashA.lastStashAt;
}
if (sorting.value === 'name') {
return stashA.name.localeCompare(stashB.name);
}
if (sorting.value === 'size') {
return (stashB.stashedScenes + stashB.stashedMovies + stashB.stashedActors)
- (stashA.stashedScenes + stashA.stashedMovies + stashA.stashedActors);
}
if (sorting.value === 'created') {
return stashA.createdAt - stashB.createdAt;
}
return 0;
})
.toSorted((stashA, stashB) => {
// always put favorites first
return stashB.isPrimary - stashA.isPrimary;
}));
const activeStashes = computed(() => sortedStashes.value.filter((stash) => !stash.isArchived));
const archivedStashes = computed(() => sortedStashes.value.filter((stash) => stash.isArchived));
function toggleSorting() {
sorting.value = sortings[(sortings.indexOf(sorting.value) + 1) % sortings.length];
}
</script>
<template>
<section class="profile-section">
<div class="section-header">
<div class="section-header noselect">
<button
v-if="profile.id === user?.id"
class="button"
@@ -31,6 +70,38 @@ async function reloadStashes() {
<Icon icon="folder-plus2" />
<span class="button-label">New stash</span>
</button>
<Icon
v-if="sorting === 'used'"
v-tooltip="'By last stash'"
icon="sort-heart"
class="sort"
@click="toggleSorting"
/>
<Icon
v-if="sorting === 'name'"
v-tooltip="'By name'"
icon="sort-alpha-asc"
class="sort"
@click="toggleSorting"
/>
<Icon
v-if="sorting === 'size'"
v-tooltip="'By total stashed'"
icon="sort-amount-desc"
class="sort"
@click="toggleSorting"
/>
<Icon
v-if="sorting === 'created'"
v-tooltip="'By stash age'"
icon="sort-time-asc"
class="sort"
@click="toggleSorting"
/>
</div>
<StashDialog
@@ -41,7 +112,29 @@ async function reloadStashes() {
<ul class="stashes nolist">
<li
v-for="stash in stashes"
v-for="stash in activeStashes"
:key="`stash-${stash.id}`"
>
<StashTile
:stash="stash"
:profile="profile"
@reload="reloadStashes"
/>
</li>
</ul>
<h3
v-if="archivedStashes.length > 0"
class="archived-heading"
@click="showArchived = !showArchived"
><Icon icon="drawer3" />{{ showArchived ? 'Hide' : `Show ${archivedStashes.length}` }} archived {{ archivedStashes.length > 1 ? 'stashes' : 'stash' }}</h3>
<ul
v-if="showArchived"
class="stashes nolist"
>
<li
v-for="stash in archivedStashes"
:key="`stash-${stash.id}`"
>
<StashTile
@@ -59,6 +152,7 @@ async function reloadStashes() {
display: flex;
justify-content: center;
margin-bottom: .5rem;
gap: 1rem;
}
.stashes {
@@ -68,6 +162,30 @@ async function reloadStashes() {
padding: 0 0 1rem 0;
}
.sort {
padding: .5rem 1rem;
fill: var(--glass);
&:hover {
fill: var(--primary);
cursor: pointer;
}
}
.archived-heading {
display: flex;
align-items: center;
font-size: 1rem;
color: var(--glass);
cursor: pointer;
.icon {
fill: var(--glass);
margin-right: .75rem;
transform: translateY(-1px);
}
}
@media(--compact) {
.stashes {
padding: 0 1rem 1rem 1rem;
+47
View File
@@ -91,6 +91,30 @@ async function rename() {
showRenameDialog.value = false;
}
async function archive(isArchived = true) {
if (done.value === false) {
return;
}
done.value = false;
await patch(`/stashes/${props.stash.id}`, { isArchived }, {
...isArchived
? {
undoFeedback: `Stash archived`,
}
: {
successFeedback: `Stash revived`,
},
errorFeedback: `Failed to ${isArchived ? 'archive' : 'revive'} stash`,
appendErrorMessage: true,
}).finally(() => { done.value = true; });
emit('reload');
showRenameDialog.value = false;
}
</script>
<template>
@@ -159,6 +183,28 @@ async function rename() {
/>Rename
</li>
<li
v-if="stash.isArchived"
class="menu-item"
@click="archive(false)"
>
<Icon
icon="drawer-out"
class="noselect"
/>Revive
</li>
<li
v-else
class="menu-item"
@click="archive()"
>
<Icon
icon="drawer-in"
class="noselect"
/>Archive
</li>
<li
v-if="!stash.isPrimary"
class="menu-item remove"
@@ -306,6 +352,7 @@ async function rename() {
display: flex;
margin-right: .75rem;
fill: var(--glass);
transform: translateY(-1px);
}
&.remove {
+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.11",
"version": "0.57.25",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"version": "0.57.11",
"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.11",
"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,10 +10,12 @@ export async function onBeforeRender(pageContext) {
const {
revisions,
total: revisionTotal,
avatars,
} = await fetchActorRevisions(null, {
isFinalized: false,
limit: 50,
isFinalized: Object.hasOwn(pageContext.urlParsed.search, 'final'),
limit: Number(pageContext.urlParsed.search.limit) || 100,
page: Number(pageContext.routeParams.page) || 1,
}, pageContext.user);
return {
@@ -21,6 +23,7 @@ export async function onBeforeRender(pageContext) {
title: pageContext.routeParams.section,
pageProps: {
revisions,
revisionTotal,
avatars,
},
},
+3 -1
View File
@@ -1,6 +1,6 @@
import { match } from 'path-to-regexp';
const path = '/admin/:section/:domain(actors)';
const path = '/admin/:section/:domain(actors)/:page?';
const urlMatch = match(path, { decode: decodeURIComponent });
export default (pageContext) => {
@@ -11,6 +11,8 @@ export default (pageContext) => {
routeParams: {
section: matched.params.section,
domain: matched.params.domain,
page: matched.params.page || '1',
path,
},
};
}
@@ -10,12 +10,14 @@ export async function onBeforeRender(pageContext) {
const {
revisions,
total: revisionTotal,
actors,
tags,
movies,
} = await fetchSceneRevisions(null, {
isFinalized: false,
limit: 50,
isFinalized: Object.hasOwn(pageContext.urlParsed.search, 'final'),
limit: Number(pageContext.urlParsed.search.limit) || 100,
page: Number(pageContext.routeParams.page) || 1,
}, pageContext.user);
return {
@@ -23,6 +25,7 @@ export async function onBeforeRender(pageContext) {
title: pageContext.routeParams.section,
pageProps: {
revisions,
revisionTotal,
actors,
tags,
movies,
+3 -1
View File
@@ -1,6 +1,6 @@
import { match } from 'path-to-regexp';
const path = '/admin/:section/:domain(scenes)';
const path = '/admin/:section/:domain(scenes)/:page?';
const urlMatch = match(path, { decode: decodeURIComponent });
export default (pageContext) => {
@@ -11,6 +11,8 @@ export default (pageContext) => {
routeParams: {
section: matched.params.section,
domain: matched.params.domain,
page: matched.params.page || '1',
path,
},
};
}
@@ -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,
+1 -1
View File
@@ -20,7 +20,7 @@ const domain = pageContext.routeParams.domain;
const user = pageContext.user;
const profile = ref(pageContext.pageProps.profile);
const primaryStash = pageContext.assets.primaryStash;
const primaryStash = pageContext.assets?.primaryStash;
const showFilters = ref(false);
+7 -3
View File
@@ -15,14 +15,16 @@ async function fetchRevisions(pageContext) {
if (pageContext.routeParams.section === 'revisions' && pageContext.routeParams.domain === 'scenes') {
return fetchSceneRevisions(null, {
userId: pageContext.user.id,
limit: 100,
limit: Number(pageContext.urlParsed.search.limit) || 100,
page: Number(pageContext.routeParams.page) || 1,
}, pageContext.user);
}
if (pageContext.routeParams.section === 'revisions' && pageContext.routeParams.domain === 'actors') {
return fetchActorRevisions(null, {
userId: pageContext.user.id,
limit: 100,
limit: Number(pageContext.urlParsed.search.limit) || 100,
page: Number(pageContext.routeParams.page) || 1,
}, pageContext.user);
}
@@ -31,7 +33,7 @@ async function fetchRevisions(pageContext) {
export async function onBeforeRender(pageContext) {
const [profile, alerts, userRevisions, keys] = await Promise.all([
fetchUser(pageContext.routeParams.username, {}, pageContext.user),
fetchUser(pageContext.routeParams.username, { throwError: false }, pageContext.user),
pageContext.routeParams.section === 'alerts' && pageContext.routeParams.username === pageContext.user?.username
? fetchAlerts(pageContext.user)
: [],
@@ -47,6 +49,7 @@ export async function onBeforeRender(pageContext) {
const {
revisions,
total: revisionTotal,
actors,
tags,
movies,
@@ -63,6 +66,7 @@ export async function onBeforeRender(pageContext) {
stashes,
alerts,
revisions,
revisionTotal,
keys,
actors,
tags,
+3 -1
View File
@@ -1,7 +1,7 @@
import { match } from 'path-to-regexp';
import { redirect } from 'vike/abort';
const path = '/user/:username/:section?/:domain?';
const path = '/user/:username/:section?/:domain?/:page?';
const urlMatch = match(path, { decode: decodeURIComponent });
export default (pageContext) => {
@@ -18,6 +18,8 @@ export default (pageContext) => {
username: matched.params.username,
section: matched.params.section || '',
domain: matched.params.domain || '',
page: matched.params.page || '1',
path,
},
};
}
+1 -1
View File
@@ -67,7 +67,7 @@ async function onRenderHtml(pageContext) {
<meta name="theme-color" content="#f65596">
<meta property="og:title" content="traxxx" />
<meta property="og:image" content="https://traxxx.me/img/og_logo.png" />
<meta property="og:description" content="${pageContext.description || 'Never miss new adult videos with traxxx'}" />
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,interactive-widget=resizes-content" />
+30
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,
@@ -1059,6 +1085,7 @@ export async function fetchActorRevisions(revisionId, filters = {}, reqUser) {
'actors_revisions.*',
'users.username as username',
'reviewers.username as reviewer_username',
knex.raw('count(*) over() as total'),
)
.leftJoin('users', 'users.id', 'actors_revisions.user_id')
.leftJoin('users as reviewers', 'reviewers.id', 'actors_revisions.reviewed_by')
@@ -1105,6 +1132,7 @@ export async function fetchActorRevisions(revisionId, filters = {}, reqUser) {
return {
revisions: curatedRevisions,
revision: revisionId && curatedRevisions.find((revision) => revision.id === revisionId),
total: Number(revisions[0]?.total) || 0,
avatars,
};
}
@@ -1183,7 +1211,9 @@ async function applyActorRevision(revisionIds, reqUser) {
'gender',
'avatar',
'dateOfBirth',
'dateOfBirthPrecision',
'dateOfDeath',
'dateOfDeathPrecision',
'originCountry',
'originState',
'originCity',
+2 -1
View File
@@ -738,6 +738,7 @@ export async function notify(sceneIds, options = {}) {
.insert(stashEntries)
.onConflict(['stash_id', 'scene_id'])
.ignore()
.returning('id')
: [],
notifications.length > 0
? knex('notifications')
@@ -754,7 +755,7 @@ export async function notify(sceneIds, options = {}) {
const docs = stashedEntries.map((stash) => ({
replace: {
index: 'scenes_stashed',
table: 'scenes_stashed',
id: stash.id,
doc: {
scene_id: stash.scene_id,
+8
View File
@@ -628,6 +628,14 @@ export async function verifyKey(userId, key, req) {
throw new HttpError('The API credentials are not provided.', 401);
}
if (typeof userId !== 'number') {
throw new HttpError('User ID is not a number', 400);
}
if (typeof key !== 'string') {
throw new HttpError('Key is not a string', 400);
}
const hashedKey = (await scrypt(key, '', 64)).toString('hex'); // salt redundant for randomly generated key
const storedKey = await knex('users_keys')
+3 -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' })) || [],
@@ -766,6 +766,7 @@ export async function fetchSceneRevisions(revisionId, filters = {}, reqUser) {
'scenes_revisions.*',
'users.username as username',
'reviewers.username as reviewer_username',
knexOwner.raw('count(*) over() as total'),
)
.leftJoin('users', 'users.id', 'scenes_revisions.user_id')
.leftJoin('users as reviewers', 'reviewers.id', 'scenes_revisions.reviewed_by')
@@ -824,6 +825,7 @@ export async function fetchSceneRevisions(revisionId, filters = {}, reqUser) {
return {
revisions: curatedRevisions,
revision: revisionId && curatedRevisions.find((revision) => revision.id === revisionId),
total: Number(revisions[0]?.total) || 0,
actors,
tags,
movies,
+3 -1
View File
@@ -25,6 +25,7 @@ export function curateStash(stash, assets = {}) {
slug: stash.slug,
isPrimary: stash.primary,
isPublic: stash.public,
isArchived: stash.archived,
createdAt: stash.created_at,
stashedScenes: stash.stashed_scenes ?? null,
stashedMovies: stash.stashed_movies ?? null,
@@ -65,7 +66,8 @@ function curateStashEntry(stash, user) {
user_id: user?.id || undefined,
name: stash.name || undefined,
slug: slugify(stash.name) || undefined,
public: stash.isPublic ?? false,
public: stash.isPublic ?? undefined,
archived: stash.isArchived ?? undefined,
comment: stash.comment,
meta: stash.meta,
};
+1 -1
View File
@@ -112,7 +112,7 @@ export async function graphqlApi(req, res) {
return;
}
await verifyKey(req.headers['api-user'], req.headers['api-key'], req);
await verifyKey(Number(req.headers['api-user']), req.headers['api-key'], req);
req.user = {
id: Number(req.headers['api-user']),
+12
View File
@@ -131,6 +131,7 @@ export const scenesSchema = `
network: Entity
actors: [Actor!]!
tags: [Tag!]!
chapters: [Chapter!]!
poster: Media
trailer: Media
photos: [Media!]!
@@ -160,6 +161,17 @@ export const scenesSchema = `
size: Int
createdAt: Int
}
type Chapter {
id: Int!
time: Int
tags: [Tag!]!
date: Date
duration: Int
description: String
title: String
poster: Media
}
`;
function getScope(query) {
+1 -1
View File
@@ -119,7 +119,7 @@ export default async function initServer() {
router.use('/api/{*splat}', async (req, _res, next) => {
if (req.headers['api-user']) {
req.user = await verifyKey(req.headers['api-user'], req.headers['api-key'], req);
req.user = await verifyKey(Number(req.headers['api-user']), req.headers['api-key'], req);
}
next();