Fixed scene actor tag revision display.

This commit is contained in:
2026-03-22 05:53:13 +01:00
parent fa65da75bc
commit b61631c33c
2 changed files with 32 additions and 3 deletions

View File

@@ -266,7 +266,7 @@ const expanded = ref(new Set());
const mappedKeys = {
actors: actorsById,
tags: tagsById,
// tags: tagsById,
movies: moviesById,
};
@@ -292,6 +292,16 @@ const curatedRevisions = computed(() => revisions.value.map((revision) => {
}))];
}
if (key === 'tags') {
return [key, value.map((tag) => ({
id: tag.id,
name: tag.actorId
? `${actorsById.value[tag.actorId]?.name}: ${tagsById.value[tag.id]?.name}`
: tagsById.value[tag.id]?.name,
modified: revision.deltas.some((delta) => delta.key === key && !delta.value.some((deltaTag) => deltaTag.id === tag.id)),
}))];
}
if (key === 'socials') {
// new socials don't have IDs yet, so we need to compare the values
return [key, value.map((item) => ({
@@ -323,6 +333,19 @@ const curatedRevisions = computed(() => revisions.value.map((revision) => {
};
}
if (delta.key === 'tags') {
return {
...delta,
value: delta.value.map((tag) => ({
id: tag.id,
name: tag.actorId
? `${actorsById.value[tag.actorId]?.name}: ${tagsById.value[tag.id]?.name}`
: tagsById.value[tag.id]?.name,
modified: !revision.base[delta.key].some((deltaTag) => deltaTag.id === tag.id),
})),
};
}
if (delta.key === 'socials') {
// new socials don't have IDs yet, so we need to compare the values
return {