Fixed scene actor tag revision display.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user