Expanded edit fields. Added revision history to scene and user pages.

This commit is contained in:
2024-10-06 02:45:56 +02:00
parent 8bf9e22b39
commit 8f843f321d
57 changed files with 1664 additions and 156 deletions

View File

@@ -0,0 +1,34 @@
import { fetchScenesById, fetchSceneRevisions } from '#/src/scenes.js';
export async function onBeforeRender(pageContext) {
const [scene] = await fetchScenesById([Number(pageContext.routeParams.sceneId)], {
reqUser: pageContext.user,
includeAssets: true,
includePartOf: true,
actorStashes: true,
});
const {
revisions,
actors,
tags,
movies,
} = await fetchSceneRevisions(null, {
sceneId: scene.id,
isFinalized: true,
limit: 100,
}, pageContext.user);
return {
pageContext: {
title: `Revisions for '${scene.title}'`,
pageProps: {
scene,
revisions,
actors,
tags,
movies,
},
},
};
}