Added actor revision overviews to actor and user pages.
This commit is contained in:
@@ -39,18 +39,27 @@
|
||||
class="photos nobar"
|
||||
:class="{ 'has-avatar': actor.avatar, 'has-photos': actor.avatar ? photos.length > 1 : photos.length > 0 }"
|
||||
>
|
||||
<img
|
||||
<div
|
||||
v-for="photo in photos"
|
||||
:key="`photo-${photo.id}`"
|
||||
:src="getPath(photo, 'thumbnail')"
|
||||
:width="photo.width"
|
||||
:height="photo.height"
|
||||
:style="{ 'background-image': `url('${getPath(photo, 'lazy')}')` }"
|
||||
:title="photo.credit && `© ${photo.credit}`"
|
||||
loading="lazy"
|
||||
class="photo"
|
||||
class="photo-container"
|
||||
:class="{ avatar: photo.isAvatar }"
|
||||
>
|
||||
<img
|
||||
:src="getPath(photo, 'thumbnail')"
|
||||
:width="photo.width"
|
||||
:height="photo.height"
|
||||
:style="{ 'background-image': `url('${getPath(photo, 'lazy')}')` }"
|
||||
:title="photo.credit && `© ${photo.credit}`"
|
||||
loading="lazy"
|
||||
class="photo"
|
||||
>
|
||||
|
||||
<span
|
||||
v-if="photo.credit"
|
||||
class="photo-credit"
|
||||
>{{ photo.credit }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Domains
|
||||
@@ -150,18 +159,37 @@ const photos = Object.values(Object.fromEntries(actor.profiles
|
||||
}
|
||||
}
|
||||
|
||||
.photo-container {
|
||||
position: relative;
|
||||
font-size: 0;
|
||||
|
||||
&.avatar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.photo {
|
||||
height: 14rem;
|
||||
width: auto;
|
||||
object-fit: cover;
|
||||
object-position: 50% 0;
|
||||
border-radius: .25rem;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
box-shadow: 0 0px 3px var(--shadow-weak-30);
|
||||
}
|
||||
|
||||
&.avatar {
|
||||
display: none;
|
||||
}
|
||||
.photo-credit {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
box-sizing: border-box;
|
||||
padding: .15rem .2rem;
|
||||
color: var(--text-light);
|
||||
font-size: .75rem;
|
||||
text-shadow: 1px 1px 0 var(--shadow-strong-20);
|
||||
}
|
||||
|
||||
.domains-bar {
|
||||
@@ -174,7 +202,7 @@ const photos = Object.values(Object.fromEntries(actor.profiles
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.photo.avatar {
|
||||
.photo-container.avatar {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<li>
|
||||
<a
|
||||
:href="`/actor/revisions/${actor.id}/${actor.slug}`"
|
||||
:href="`/actor/revs/${actor.id}/${actor.slug}`"
|
||||
class="link"
|
||||
>Go to actor revisions</a>
|
||||
</li>
|
||||
@@ -86,9 +86,20 @@
|
||||
v-if="item.type === 'string'"
|
||||
v-model="edits[item.key]"
|
||||
class="string input"
|
||||
:list="item.suggestions && `suggestions-${item.key}`"
|
||||
:disabled="!editing.has(item.key)"
|
||||
>
|
||||
|
||||
<datalist
|
||||
v-if="item.suggestions"
|
||||
:id="`suggestions-${item.key}`"
|
||||
>
|
||||
<option
|
||||
v-for="(suggestion, index) in item.suggestions"
|
||||
:key="`suggestion-${item.key}-${index}`"
|
||||
>{{ suggestion }}</option>
|
||||
</datalist>
|
||||
|
||||
<textarea
|
||||
v-if="item.type === 'text'"
|
||||
v-model="edits[item.key]"
|
||||
@@ -485,38 +496,13 @@
|
||||
class="avatars"
|
||||
:class="{ disabled: !editing.has(item.key) }"
|
||||
>
|
||||
<div
|
||||
<Avatar
|
||||
v-for="avatar in item.options"
|
||||
:key="`avatar-${avatar.id}`"
|
||||
class="avatar noshrink"
|
||||
:avatar="avatar"
|
||||
:class="{ selected: edits[item.key] === avatar.id }"
|
||||
@click="setAvatar(avatar.id)"
|
||||
>
|
||||
<img
|
||||
:src="getPath(avatar, 'thumbnail')"
|
||||
class="avatar-image"
|
||||
>
|
||||
|
||||
<span
|
||||
class="avatar-credit"
|
||||
title="Credit"
|
||||
>{{ avatar.credit }}</span>
|
||||
|
||||
<span class="avatar-meta">
|
||||
<span title="Dimensions">{{ avatar.width }}x{{ avatar.height }}</span>
|
||||
<span title="Sharpness">{{ avatar.sharpness.toFixed(2) }}</span>
|
||||
</span>
|
||||
|
||||
<a
|
||||
:href="getPath(avatar)"
|
||||
target="_blank"
|
||||
class="avatar-zoom"
|
||||
>
|
||||
<Icon
|
||||
icon="search"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -561,8 +547,7 @@
|
||||
import { ref, computed, inject } from 'vue';
|
||||
import { format } from 'date-fns';
|
||||
|
||||
import getPath from '#/src/get-path.js';
|
||||
|
||||
import Avatar from '#/components/edit/avatar.vue';
|
||||
import Checkbox from '#/components/form/checkbox.vue';
|
||||
|
||||
import {
|
||||
@@ -576,8 +561,6 @@ const user = pageContext.user;
|
||||
const countries = pageContext.pageProps.countries;
|
||||
const actor = ref(pageContext.pageProps.actor);
|
||||
|
||||
console.log(actor.value);
|
||||
|
||||
const topCountries = [
|
||||
'AU',
|
||||
'BR',
|
||||
@@ -658,14 +641,14 @@ const fields = computed(() => [
|
||||
{
|
||||
key: 'height',
|
||||
type: 'number',
|
||||
value: actor.value.height.metric,
|
||||
value: actor.value.height?.metric,
|
||||
unit: 'cm',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
key: 'weight',
|
||||
type: 'number',
|
||||
value: actor.value.weight.metric,
|
||||
value: actor.value.weight?.metric,
|
||||
unit: 'kg',
|
||||
inline: true,
|
||||
},
|
||||
@@ -743,6 +726,22 @@ const fields = computed(() => [
|
||||
description: actor.value.piercings,
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'agency',
|
||||
type: 'string',
|
||||
value: actor.value.agency,
|
||||
suggestions: [
|
||||
'101 Modeling',
|
||||
'Adult Talent Managers (ATMLA)',
|
||||
'The Bakery Talent',
|
||||
'Coxxx Models',
|
||||
'East Coast Talent (ECT)',
|
||||
'Hussie Models',
|
||||
'Invision Models',
|
||||
'OC Modeling',
|
||||
'Spiegler Girls',
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'penis',
|
||||
type: 'penis',
|
||||
@@ -780,30 +779,8 @@ function toggleField(item) {
|
||||
}
|
||||
|
||||
editing.value.add(item.key);
|
||||
|
||||
/*
|
||||
if (Array.isArray(item.value)) {
|
||||
edits.value[item.key] = item.value.map((value) => value.hash || value.id);
|
||||
return;
|
||||
}
|
||||
|
||||
edits.value[item.key] = item.value;
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
function setValue(item, event) {
|
||||
console.log(item, event.target.value);
|
||||
|
||||
if (item.type === 'number') {
|
||||
edits.value[item.key] = Number(event.target.value);
|
||||
return;
|
||||
}
|
||||
|
||||
edits.value[item.key] = event.target.value;
|
||||
}
|
||||
*/
|
||||
|
||||
function setAvatar(avatarId) {
|
||||
edits.value.avatar = avatarId;
|
||||
}
|
||||
@@ -822,8 +799,6 @@ const keyMap = {
|
||||
};
|
||||
|
||||
async function submit() {
|
||||
console.log('SUBMIT', Array.from(editing.value), edits.value);
|
||||
|
||||
try {
|
||||
await post('/revisions/actors', {
|
||||
actorId: actor.value.id,
|
||||
@@ -1014,75 +989,6 @@ async function submit() {
|
||||
}
|
||||
}
|
||||
|
||||
.avatar {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
border: solid 2px transparent;
|
||||
border-radius: .35rem;
|
||||
box-shadow: 0 0 3px var(--shadow-weak-10);
|
||||
margin: 2px; /* clear outline */
|
||||
font-size: 0;
|
||||
overflow: hidden;
|
||||
|
||||
&.selected {
|
||||
border: solid 2px var(--primary);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
/*
|
||||
.avatar-meta,
|
||||
.avatar-credit {
|
||||
display: none;
|
||||
}
|
||||
*/
|
||||
|
||||
.icon {
|
||||
fill: var(--text-light);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-image {
|
||||
height: 10rem;
|
||||
}
|
||||
|
||||
.avatar-zoom {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
padding: .25rem;
|
||||
|
||||
.icon {
|
||||
fill: var(--highlight);
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-meta,
|
||||
.avatar-credit {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
box-sizing: border-box;
|
||||
padding: .15rem .25rem;
|
||||
font-size: .7rem;
|
||||
color: var(--text-light);
|
||||
text-shadow: 1px 1px 0 var(--shadow-strong-30);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.avatar-meta {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.avatar-credit {
|
||||
bottom: .75rem;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.item-actions {
|
||||
.icon {
|
||||
padding: .25rem 1rem;
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
<div class="revs-header">
|
||||
<h2 class="heading">Revisions for "{{ scene.title }}"</h2>
|
||||
<h2 class="heading">Revisions for "{{ actor.name }}"</h2>
|
||||
|
||||
<div class="revs-actions">
|
||||
<a
|
||||
:href="`/scene/edit/${scene.id}/${scene.slug}`"
|
||||
:href="`/actor/edit/${actor.id}/${actor.slug}`"
|
||||
class="link"
|
||||
>Edit scene</a>
|
||||
>Edit actor</a>
|
||||
|
||||
<a
|
||||
:href="`/scene/${scene.id}/${scene.slug}`"
|
||||
:href="`/actor/${actor.id}/${actor.slug}`"
|
||||
target="_blank"
|
||||
class="link"
|
||||
>Go to scene</a>
|
||||
>Go to actor</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Revisions context="scene" />
|
||||
<Revisions context="actor" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -27,7 +27,7 @@ import { inject } from 'vue';
|
||||
import Revisions from '#/components/edit/revisions.vue';
|
||||
|
||||
const pageContext = inject('pageContext');
|
||||
const scene = pageContext.pageProps.scene;
|
||||
const actor = pageContext.pageProps.actor;
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
import { fetchActorsById } from '#/src/actors.js';
|
||||
import { fetchSceneRevisions } from '#/src/scenes.js';
|
||||
import { fetchActorsById, fetchActorRevisions } from '#/src/actors.js';
|
||||
|
||||
export async function onBeforeRender(pageContext) {
|
||||
const [actor] = await fetchActorsById([Number(pageContext.routeParams.actorId)], {}, pageContext.user);
|
||||
|
||||
const {
|
||||
revisions,
|
||||
} = await fetchSceneRevisions(null, {
|
||||
sceneId: actor.id,
|
||||
avatars,
|
||||
} = await fetchActorRevisions(null, {
|
||||
actorId: actor.id,
|
||||
isFinalized: true,
|
||||
limit: 100,
|
||||
}, pageContext.user);
|
||||
|
||||
return {
|
||||
pageContext: {
|
||||
title: `Revisions for '${actor.name}'`,
|
||||
title: `Revs for '${actor.name}'`,
|
||||
pageProps: {
|
||||
actor,
|
||||
revisions,
|
||||
avatars,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1 +1,19 @@
|
||||
export default '/actor/revisions/@actorId/*';
|
||||
import { match } from 'path-to-regexp';
|
||||
|
||||
const path = '/actor/revs/:actorId/:slug?';
|
||||
const urlMatch = match(path, { decode: decodeURIComponent });
|
||||
|
||||
export default (pageContext) => {
|
||||
const matched = urlMatch(pageContext.urlPathname);
|
||||
|
||||
if (matched) {
|
||||
return {
|
||||
routeParams: {
|
||||
actorId: matched.params.actorId,
|
||||
domain: 'actors',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
@@ -1,9 +1,36 @@
|
||||
<template>
|
||||
<Admin>
|
||||
<h2 class="heading">Admin Panel</h2>
|
||||
|
||||
<ul class="menu">
|
||||
<li>
|
||||
<a
|
||||
href="/admin/revisions/scenes"
|
||||
class="link"
|
||||
>Scene Revisions</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a
|
||||
href="/admin/revisions/actors"
|
||||
class="link"
|
||||
>Actor Revisions</a>
|
||||
</li>
|
||||
</ul>
|
||||
</Admin>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Admin from '#/components/admin/admin.vue';
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.menu {
|
||||
margin: 0;
|
||||
|
||||
.link {
|
||||
display: block;
|
||||
padding: .25rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,6 +8,7 @@ export async function onBeforeRender(pageContext) {
|
||||
|
||||
const {
|
||||
revisions,
|
||||
avatars,
|
||||
} = await fetchActorRevisions(null, {
|
||||
isFinalized: false,
|
||||
limit: 50,
|
||||
@@ -18,6 +19,7 @@ export async function onBeforeRender(pageContext) {
|
||||
title: pageContext.routeParams.section,
|
||||
pageProps: {
|
||||
revisions,
|
||||
avatars,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
>Edit scene</a>
|
||||
|
||||
<a
|
||||
:href="`/scene/revisions/${scene.id}/${scene.slug}`"
|
||||
:href="`/scene/revs/${scene.id}/${scene.slug}`"
|
||||
target="_blank"
|
||||
class="link"
|
||||
>Revisions</a>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<li>
|
||||
<a
|
||||
:href="`/scene/revisions/${scene.id}/${scene.slug}`"
|
||||
:href="`/scene/revs/${scene.id}/${scene.slug}`"
|
||||
class="link"
|
||||
>Go to scene revisions</a>
|
||||
</li>
|
||||
@@ -320,7 +320,7 @@ function setDuration(unit, event) {
|
||||
|
||||
async function submit() {
|
||||
try {
|
||||
await post('/revisions', {
|
||||
await post('/revisions/scenes', {
|
||||
sceneId: scene.value.id,
|
||||
edits: {
|
||||
...edits.value,
|
||||
|
||||
@@ -21,7 +21,7 @@ export async function onBeforeRender(pageContext) {
|
||||
|
||||
return {
|
||||
pageContext: {
|
||||
title: `Revisions for '${scene.title}'`,
|
||||
title: `Revs for '${scene.title}'`,
|
||||
pageProps: {
|
||||
scene,
|
||||
revisions,
|
||||
|
||||
@@ -1 +1,19 @@
|
||||
export default '/scene/revisions/@sceneId/*';
|
||||
import { match } from 'path-to-regexp';
|
||||
|
||||
const path = '/scene/revs/:sceneId/:slug?';
|
||||
const urlMatch = match(path, { decode: decodeURIComponent });
|
||||
|
||||
export default (pageContext) => {
|
||||
const matched = urlMatch(pageContext.urlPathname);
|
||||
|
||||
if (matched) {
|
||||
return {
|
||||
routeParams: {
|
||||
sceneId: matched.params.sceneId,
|
||||
domain: 'scenes',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
@@ -22,42 +22,48 @@
|
||||
<a
|
||||
:href="`/user/${profile.username}/stashes`"
|
||||
class="domain nolink"
|
||||
:class="{ active: domain === 'stashes' }"
|
||||
:class="{ active: section === 'stashes' }"
|
||||
>Stashes</a>
|
||||
|
||||
<a
|
||||
:href="`/user/${profile.username}/alerts`"
|
||||
class="domain nolink"
|
||||
:class="{ active: domain === 'alerts' }"
|
||||
:class="{ active: section === 'alerts' }"
|
||||
>Alerts</a>
|
||||
|
||||
<a
|
||||
:href="`/user/${profile.username}/templates`"
|
||||
class="domain nolink"
|
||||
:class="{ active: domain === 'templates' }"
|
||||
:class="{ active: section === 'templates' }"
|
||||
>Templates</a>
|
||||
|
||||
<a
|
||||
:href="`/user/${profile.username}/revisions`"
|
||||
:href="`/user/${profile.username}/revisions/scenes`"
|
||||
class="domain nolink"
|
||||
:class="{ active: domain === 'revisions' }"
|
||||
>Revisions</a>
|
||||
:class="{ active: section === 'revisions' && domain === 'scenes' }"
|
||||
>Scene Revisions</a>
|
||||
|
||||
<a
|
||||
:href="`/user/${profile.username}/revisions/actors`"
|
||||
class="domain nolink"
|
||||
:class="{ active: section === 'revisions' && domain === 'actors' }"
|
||||
>Actor Revisions</a>
|
||||
</nav>
|
||||
|
||||
<Stashes v-if="domain === 'stashes'" />
|
||||
<Alerts v-if="domain === 'alerts' && profile.id === user?.id" />
|
||||
<Stashes v-if="section === 'stashes'" />
|
||||
<Alerts v-if="section === 'alerts' && profile.id === user?.id" />
|
||||
|
||||
<Summaries
|
||||
v-if="domain === 'templates' && profile.id === user?.id"
|
||||
v-if="section === 'templates' && profile.id === user?.id"
|
||||
:release="mockupRelease"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="domain === 'revisions' && profile.id === user?.id"
|
||||
v-if="section === 'revisions' && profile.id === user?.id"
|
||||
class="profile-section revisions"
|
||||
>
|
||||
<h3 class="section-header heading">Revisions</h3>
|
||||
<h3 class="section-header heading">{{ domain.slice(0, -1) }} Revisions</h3>
|
||||
<Revisions context="user" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,7 +79,10 @@ import Summaries from '#/components/scenes/summaries.vue';
|
||||
import Revisions from '#/components/edit/revisions.vue';
|
||||
|
||||
const pageContext = inject('pageContext');
|
||||
|
||||
const section = pageContext.routeParams.section;
|
||||
const domain = pageContext.routeParams.domain;
|
||||
|
||||
const user = pageContext.user;
|
||||
const profile = ref(pageContext.pageProps.profile);
|
||||
|
||||
@@ -117,6 +126,7 @@ const mockupRelease = {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: .5rem 1rem;
|
||||
text-transform: capitalize;
|
||||
|
||||
.button {
|
||||
margin-left: 1rem;
|
||||
@@ -222,6 +232,11 @@ const mockupRelease = {
|
||||
padding: 0 1rem;
|
||||
}
|
||||
|
||||
.revisions-nav {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
@media(--compact) {
|
||||
.domains {
|
||||
padding: .5rem 1rem;
|
||||
|
||||
@@ -4,19 +4,37 @@ import { fetchUser } from '#/src/users.js';
|
||||
import { fetchUserStashes } from '#/src/stashes.js';
|
||||
import { fetchAlerts } from '#/src/alerts.js';
|
||||
import { fetchSceneRevisions } from '#/src/scenes.js';
|
||||
import { fetchActorRevisions } from '#/src/actors.js';
|
||||
|
||||
async function fetchRevisions(pageContext) {
|
||||
if (pageContext.routeParams.username !== pageContext.user?.username) {
|
||||
return {};
|
||||
}
|
||||
|
||||
if (pageContext.routeParams.section === 'revisions' && pageContext.routeParams.domain === 'scenes') {
|
||||
return fetchSceneRevisions(null, {
|
||||
userId: pageContext.user.id,
|
||||
limit: 100,
|
||||
}, pageContext.user);
|
||||
}
|
||||
|
||||
if (pageContext.routeParams.section === 'revisions' && pageContext.routeParams.domain === 'actors') {
|
||||
return fetchActorRevisions(null, {
|
||||
userId: pageContext.user.id,
|
||||
limit: 100,
|
||||
}, pageContext.user);
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
export async function onBeforeRender(pageContext) {
|
||||
const [profile, alerts, userRevisions] = await Promise.all([
|
||||
fetchUser(pageContext.routeParams.username, {}, pageContext.user),
|
||||
pageContext.routeParams.domain === 'stashes' && pageContext.routeParams.username === pageContext.user?.username
|
||||
pageContext.routeParams.section === 'alerts' && pageContext.routeParams.username === pageContext.user?.username
|
||||
? fetchAlerts(pageContext.user)
|
||||
: [],
|
||||
pageContext.routeParams.domain === 'revisions' && pageContext.routeParams.username === pageContext.user?.username
|
||||
? fetchSceneRevisions(null, {
|
||||
userId: pageContext.user.id,
|
||||
limit: 100,
|
||||
}, pageContext.user)
|
||||
: {},
|
||||
fetchRevisions(pageContext),
|
||||
]);
|
||||
|
||||
if (!profile) {
|
||||
@@ -28,8 +46,11 @@ export async function onBeforeRender(pageContext) {
|
||||
actors,
|
||||
tags,
|
||||
movies,
|
||||
avatars,
|
||||
} = userRevisions;
|
||||
|
||||
console.log(userRevisions);
|
||||
|
||||
const stashes = await fetchUserStashes(profile.id, pageContext.user);
|
||||
|
||||
return {
|
||||
@@ -43,6 +64,7 @@ export async function onBeforeRender(pageContext) {
|
||||
actors,
|
||||
tags,
|
||||
movies,
|
||||
avatars,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { redirect } from 'vike/abort'; /* eslint-disable-line import/extensions */
|
||||
import { match } from 'path-to-regexp';
|
||||
|
||||
const path = '/user/:username/:domain?';
|
||||
const path = '/user/:username/:section?/:domain?';
|
||||
const urlMatch = match(path, { decode: decodeURIComponent });
|
||||
|
||||
export default (pageContext) => {
|
||||
@@ -15,7 +15,8 @@ export default (pageContext) => {
|
||||
return {
|
||||
routeParams: {
|
||||
username: matched.params.username,
|
||||
domain: matched.params.domain || 'stashes',
|
||||
section: matched.params.section || 'stashes',
|
||||
domain: matched.params.domain || 'scenes',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user