Added variant relation type.

This commit is contained in:
2026-11-21 03:07:32 +01:00
parent 37309473f8
commit 25c68f96a9
3 changed files with 98 additions and 76 deletions
+5 -3
View File
@@ -1,9 +1,11 @@
// labels per scene relation type, keyed by which side of the relation the related scene is on
// relations point from the derivation or compilation (source) to the original or compilation part (target)
// symmetric types like variants have no direction, and are keyed 'both'
const relationLabels = {
rerelease: { target: 'Rerelease of', source: 'Rereleased as' },
remaster: { target: 'Remaster of', source: 'Remastered as' },
compilation: { target: 'Compilation features', source: 'Featured in compilation' },
variant: { both: 'Variant of' },
};
export function getRelationLabel(type, direction) {
@@ -12,9 +14,9 @@ export function getRelationLabel(type, direction) {
}
// fallback for types added later without a label
return direction === 'target'
? `${type.charAt(0).toUpperCase()}${type.slice(1)} of`
: `Has ${type}`;
return direction === 'source'
? `Has ${type}`
: `${type.charAt(0).toUpperCase()}${type.slice(1)} of`;
}
export default relationLabels;