« get me outta code hell

content, client: linkContribution: platform info in tooltips - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-03-29 14:24:45 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-03-29 20:01:45 -0300
commit4e11adf60b74db6a69fcebbf07dcd7c8e8b00a20 (patch)
treea332795ea7fbd9729681ffe2b958165404f87dd5 /src/content/dependencies
parent6817e9d085345ac6b26a5c7b90d963c3d4bf630d (diff)
content, client: linkContribution: platform info in tooltips
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/linkContribution.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/content/dependencies/linkContribution.js b/src/content/dependencies/linkContribution.js
index cb57aa47..c69a5b48 100644
--- a/src/content/dependencies/linkContribution.js
+++ b/src/content/dependencies/linkContribution.js
@@ -1,4 +1,4 @@
-import {empty} from '#sugar';
+import {empty, stitchArrays} from '#sugar';
 
 export default {
   contentDependencies: [
@@ -34,6 +34,7 @@ export default {
   data(contribution) {
     return {
       what: contribution.what,
+      urls: contribution.who.urls,
     };
   },
 
@@ -74,12 +75,21 @@ export default {
                   {[html.joinChildren]: ''},
 
                 content:
-                  relations.artistIcons
-                    .map(icon =>
+                  stitchArrays({
+                    icon: relations.artistIcons,
+                    url: data.urls,
+                  }).map(({icon, url}) => [
                       icon.slots({
                         context: 'artist',
                         withText: true,
-                      })),
+                      }),
+
+                      html.tag('span', {class: 'icon-platform'},
+                        language.formatExternalLink(url, {
+                          context: 'artist',
+                          style: 'platform',
+                        })),
+                    ]),
               }),
           })
         : relations.artistLink);