diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-11-27 02:00:30 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-11-27 02:00:30 -0400 |
commit | 903e21d8afa9b3262194f641f8bee0955289bf21 (patch) | |
tree | 7e12050d9baa1992ed9532ac40b93f6b4f890f98 /src/page | |
parent | 398e8c25073a88cbf7e9861445c87dc9e995978a (diff) |
support & enable Sampled Tracks
Diffstat (limited to 'src/page')
-rw-r--r-- | src/page/track.js | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/page/track.js b/src/page/track.js index b61defe2..4095f75a 100644 --- a/src/page/track.js +++ b/src/page/track.js @@ -24,7 +24,16 @@ export function targets({wikiData}) { export function write(track, {wikiData}) { const {wikiInfo} = wikiData; - const {album, referencedByTracks, referencedTracks, otherReleases} = track; + + const { + album, + contributorContribs, + referencedByTracks, + referencedTracks, + sampledByTracks, + sampledTracks, + otherReleases, + } = track; const listTag = getAlbumListTag(album); @@ -277,9 +286,9 @@ export function write(track, {wikiData}) { ]), ...html.fragment( - !empty(track.contributorContribs) && [ + !empty(contributorContribs) && [ html.tag('p', language.$('releaseInfo.contributors')), - html.tag('ul', track.contributorContribs.map(contrib => + html.tag('ul', contributorContribs.map(contrib => html.tag('li', getArtistString([contrib], { showContrib: true, showIcons: true, @@ -306,6 +315,22 @@ export function write(track, {wikiData}) { ]), ...html.fragment( + !empty(sampledTracks) && [ + html.tag('p', language.$('releaseInfo.tracksSampled', { + track: html.tag('i', track.name), + })), + html.tag('ul', sampledTracks.map(getTrackItem)), + ]), + + ...html.fragment( + !empty(sampledByTracks) && [ + html.tag('p', language.$('releaseInfo.tracksThatSample', { + track: html.tag('i', track.name), + })), + html.tag('ul', sampledByTracks.map(getTrackItem)), + ]), + + ...html.fragment( wikiInfo.enableFlashesAndGames && !empty(flashesThatFeature) && [ html.tag('p', language.$('releaseInfo.flashesThatFeature', { |