« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateArtistCredit.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/generateArtistCredit.js')
-rw-r--r--src/content/dependencies/generateArtistCredit.js23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/content/dependencies/generateArtistCredit.js b/src/content/dependencies/generateArtistCredit.js
index 600d73d9..35603610 100644
--- a/src/content/dependencies/generateArtistCredit.js
+++ b/src/content/dependencies/generateArtistCredit.js
@@ -5,10 +5,10 @@ export default {
     const query = {};
 
     const featuringFilter = contribution =>
-      contribution.annotation === 'featuring';
+      contribution.isFeaturingCredit;
 
     const wikiEditFilter = contribution =>
-      contribution.annotation?.startsWith('edits for wiki');
+      contribution.isEditsForWikiCredit;
 
     const normalFilter = contribution =>
       !featuringFilter(contribution) &&
@@ -104,8 +104,6 @@ export default {
     showChronology: {type: 'boolean', default: false},
     showWikiEdits: {type: 'boolean', default: false},
 
-    trimAnnotation: {type: 'boolean', default: false},
-
     chunkwrap: {type: 'boolean', default: true},
 
     chronologyKind: {type: 'string'},
@@ -123,28 +121,13 @@ export default {
       ...relations.featuringContributionLinks,
     ]) {
       link.setSlots({
+        showAnnotation: slots.showAnnotation,
         showExternalLinks: slots.showExternalLinks,
         showChronology: slots.showChronology,
-        trimAnnotation: slots.trimAnnotation,
         chronologyKind: slots.chronologyKind,
       });
     }
 
-    for (const link of relations.normalContributionLinks) {
-      link.setSlots({
-        showAnnotation: slots.showAnnotation,
-      });
-    }
-
-    for (const link of relations.featuringContributionLinks) {
-      link.setSlots({
-        showAnnotation:
-          (slots.featuringStringKey || slots.normalFeaturingStringKey
-            ? false
-            : slots.showAnnotation),
-      });
-    }
-
     let formattedArtistList = null;
 
     if (!html.isBlank(relations.formatText)) {