« 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/generateReleaseInfoContributionsLine.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/generateReleaseInfoContributionsLine.js')
-rw-r--r--src/content/dependencies/generateReleaseInfoContributionsLine.js40
1 files changed, 17 insertions, 23 deletions
diff --git a/src/content/dependencies/generateReleaseInfoContributionsLine.js b/src/content/dependencies/generateReleaseInfoContributionsLine.js
index 2b342d09..78d3e506 100644
--- a/src/content/dependencies/generateReleaseInfoContributionsLine.js
+++ b/src/content/dependencies/generateReleaseInfoContributionsLine.js
@@ -18,32 +18,26 @@ export default {
     };
   },
 
-  generate(relations, {html, language}) {
-    return html.template({
-      annotation: `generateReleaseInfoContributionsLine`,
+  slots: {
+    stringKey: {type: 'string'},
 
-      slots: {
-        stringKey: {type: 'string'},
-
-        showContribution: {type: 'boolean', default: true},
-        showIcons: {type: 'boolean', default: true},
-      },
+    showContribution: {type: 'boolean', default: true},
+    showIcons: {type: 'boolean', default: true},
+  },
 
-      content(slots) {
-        if (!relations.contributionLinks) {
-          return html.blank();
-        }
+  generate(relations, slots, {html, language}) {
+    if (!relations.contributionLinks) {
+      return html.blank();
+    }
 
-        return language.$(slots.stringKey, {
-          artists:
-            language.formatConjunctionList(
-              relations.contributionLinks.map(link =>
-                link.slots({
-                  showContribution: slots.showContribution,
-                  showIcons: slots.showIcons,
-                }))),
-        });
-      },
+    return language.$(slots.stringKey, {
+      artists:
+        language.formatConjunctionList(
+          relations.contributionLinks.map(link =>
+            link.slots({
+              showContribution: slots.showContribution,
+              showIcons: slots.showIcons,
+            }))),
     });
   },
 };