From d3b56134bc051f4786c60991da40346227dc65eb Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 4 Nov 2025 09:30:07 -0400 Subject: content: gAIPChunk: albumLink, flashActLink slots -> link --- .../dependencies/generateArtistInfoPageChunk.js | 78 +++++++++------------- 1 file changed, 33 insertions(+), 45 deletions(-) (limited to 'src/content/dependencies/generateArtistInfoPageChunk.js') diff --git a/src/content/dependencies/generateArtistInfoPageChunk.js b/src/content/dependencies/generateArtistInfoPageChunk.js index 7fa0cfb5..3fa46c61 100644 --- a/src/content/dependencies/generateArtistInfoPageChunk.js +++ b/src/content/dependencies/generateArtistInfoPageChunk.js @@ -8,12 +8,7 @@ export default { id: {type: 'string'}, - albumLink: { - type: 'html', - mutable: false, - }, - - flashActLink: { + link: { type: 'html', mutable: false, }, @@ -51,50 +46,43 @@ export default { } let accentedLink; - - accent: { - switch (slots.mode) { - case 'album': { - accentedLink = slots.albumLink; - - const options = {album: accentedLink}; - const parts = ['artistPage.creditList.album']; - - if (onlyDate) { - parts.push('withDate'); - options.date = language.formatDate(onlyDate); - } - - if (slots.duration) { - parts.push('withDuration'); - options.duration = - language.formatDuration(slots.duration, { - approximate: slots.durationApproximate, - }); - } - - accentedLink = language.formatString(...parts, options); - break; + switch (slots.mode) { + case 'album': { + const options = {album: slots.link}; + const parts = ['artistPage.creditList.album']; + + if (onlyDate) { + parts.push('withDate'); + options.date = language.formatDate(onlyDate); } - case 'flash': { - accentedLink = slots.flashActLink; - - const options = {act: accentedLink}; - const parts = ['artistPage.creditList.flashAct']; + if (slots.duration) { + parts.push('withDuration'); + options.duration = + language.formatDuration(slots.duration, { + approximate: slots.durationApproximate, + }); + } - if (onlyDate) { - parts.push('withDate'); - options.date = language.formatDate(onlyDate); - } else if (earliestDate && latestDate) { - parts.push('withDateRange'); - options.dateRange = - language.formatDateRange(earliestDate, latestDate); - } + accentedLink = language.formatString(...parts, options); + break; + } - accentedLink = language.formatString(...parts, options); - break; + case 'flash': { + const options = {act: slots.link}; + const parts = ['artistPage.creditList.flashAct']; + + if (onlyDate) { + parts.push('withDate'); + options.date = language.formatDate(onlyDate); + } else if (earliestDate && latestDate) { + parts.push('withDateRange'); + options.dateRange = + language.formatDateRange(earliestDate, latestDate); } + + accentedLink = language.formatString(...parts, options); + break; } } -- cgit 1.3.0-6-gf8a5