Added actor revision overviews to actor and user pages.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user