Extended revision pagination to scene and actor pages, fixes 'revisions' label without count.
This commit is contained in:
@@ -225,7 +225,10 @@ async function banEditor(revision) {
|
|||||||
<div
|
<div
|
||||||
class="revs-header"
|
class="revs-header"
|
||||||
>
|
>
|
||||||
<span class="revs-total">{{ total }} revisions</span>
|
<span
|
||||||
|
v-if="typeof total === 'number'"
|
||||||
|
class="revs-total"
|
||||||
|
>{{ total }} revisions</span>
|
||||||
|
|
||||||
<Checkbox
|
<Checkbox
|
||||||
v-if="context === 'admin'"
|
v-if="context === 'admin'"
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ export async function onBeforeRender(pageContext) {
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
revisions,
|
revisions,
|
||||||
|
total: revisionTotal,
|
||||||
avatars,
|
avatars,
|
||||||
} = await fetchActorRevisions(null, {
|
} = await fetchActorRevisions(null, {
|
||||||
actorId: actor.id,
|
actorId: actor.id,
|
||||||
isFinalized: true,
|
isFinalized: true,
|
||||||
limit: 100,
|
limit: Number(pageContext.urlParsed.search.limit) || 100,
|
||||||
|
page: Number(pageContext.routeParams.page) || 1,
|
||||||
}, pageContext.user);
|
}, pageContext.user);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -18,6 +20,7 @@ export async function onBeforeRender(pageContext) {
|
|||||||
pageProps: {
|
pageProps: {
|
||||||
actor,
|
actor,
|
||||||
revisions,
|
revisions,
|
||||||
|
revisionTotal,
|
||||||
avatars,
|
avatars,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,13 +10,15 @@ export async function onBeforeRender(pageContext) {
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
revisions,
|
revisions,
|
||||||
|
total: revisionTotal,
|
||||||
actors,
|
actors,
|
||||||
tags,
|
tags,
|
||||||
movies,
|
movies,
|
||||||
} = await fetchSceneRevisions(null, {
|
} = await fetchSceneRevisions(null, {
|
||||||
sceneId: scene.id,
|
sceneId: scene.id,
|
||||||
isFinalized: true,
|
isFinalized: true,
|
||||||
limit: 100,
|
limit: Number(pageContext.urlParsed.search.limit) || 100,
|
||||||
|
page: Number(pageContext.routeParams.page) || 1,
|
||||||
}, pageContext.user);
|
}, pageContext.user);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -25,6 +27,7 @@ export async function onBeforeRender(pageContext) {
|
|||||||
pageProps: {
|
pageProps: {
|
||||||
scene,
|
scene,
|
||||||
revisions,
|
revisions,
|
||||||
|
revisionTotal,
|
||||||
actors,
|
actors,
|
||||||
tags,
|
tags,
|
||||||
movies,
|
movies,
|
||||||
|
|||||||
Reference in New Issue
Block a user