« get me outta code hell

content: chronology labels in contribution lists - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-06-18 18:05:32 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-18 22:56:17 -0300
commitc3cb6416c3da69937ed600f2a54d9e30d98cb5f1 (patch)
treef8deb1d278cc217c6846340ceb2d54ab2ed1c71e /src/content
parentf5fdcf8c5e47249e2a807203dd58b8b4819f8791 (diff)
content: chronology labels in contribution lists
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateContributionList.js7
-rw-r--r--src/content/dependencies/generateContributionTooltipChronologySection.js1
-rw-r--r--src/content/dependencies/generateFlashInfoPage.js4
-rw-r--r--src/content/dependencies/generateTrackInfoPage.js4
4 files changed, 13 insertions, 3 deletions
diff --git a/src/content/dependencies/generateContributionList.js b/src/content/dependencies/generateContributionList.js
index f22740b0..8e8c5020 100644
--- a/src/content/dependencies/generateContributionList.js
+++ b/src/content/dependencies/generateContributionList.js
@@ -8,7 +8,11 @@ export default {
         .map(contrib => relation('linkContribution', contrib)),
   }),
 
-  generate: (relations, {html}) =>
+  slots: {
+    chronologyKind: {type: 'string'},
+  },
+
+  generate: (relations, slots, {html}) =>
     html.tag('ul',
       {[html.onlyIfContent]: true},
 
@@ -20,5 +24,6 @@ export default {
               showContribution: true,
               showChronology: true,
               preventWrapping: false,
+              chronologyKind: slots.chronologyKind,
             })))),
 };
diff --git a/src/content/dependencies/generateContributionTooltipChronologySection.js b/src/content/dependencies/generateContributionTooltipChronologySection.js
index ef5c75b4..78c9051c 100644
--- a/src/content/dependencies/generateContributionTooltipChronologySection.js
+++ b/src/content/dependencies/generateContributionTooltipChronologySection.js
@@ -50,6 +50,7 @@ export default {
           'flash',
           'track',
           'trackArt',
+          'trackContribution',
           'wallpaperArt'),
     },
   },
diff --git a/src/content/dependencies/generateFlashInfoPage.js b/src/content/dependencies/generateFlashInfoPage.js
index 96337d83..d06f0c01 100644
--- a/src/content/dependencies/generateFlashInfoPage.js
+++ b/src/content/dependencies/generateFlashInfoPage.js
@@ -147,7 +147,9 @@ export default {
                 title: language.$('releaseInfo.contributors'),
               }),
 
-            relations.contributorContributionList,
+            relations.contributorContributionList.slots({
+              chronologyKind: 'flash',
+            }),
           ]),
 
           relations.artistCommentarySection,
diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js
index 7337b987..09cf55f6 100644
--- a/src/content/dependencies/generateTrackInfoPage.js
+++ b/src/content/dependencies/generateTrackInfoPage.js
@@ -217,7 +217,9 @@ export default {
                 title: language.$('releaseInfo.contributors'),
               }),
 
-            relations.contributorContributionList,
+            relations.contributorContributionList.slots({
+              chronologyKind: 'trackContribution',
+            }),
           ]),
 
           html.tags([