diff options
| author | (quasar) nebula <qznebula@protonmail.com> | 2026-01-11 07:55:11 -0400 |
|---|---|---|
| committer | (quasar) nebula <qznebula@protonmail.com> | 2026-01-11 07:55:11 -0400 |
| commit | 235daf0b24c9c4fe7977c3b861f65f22381690a8 (patch) | |
| tree | df81d8c9c0e1e3fd4003cb936ace3018b50105a3 /src/content/dependencies | |
| parent | 1bc926c8aec32106c96f055a9bf2302f41b85e75 (diff) | |
content: gAIPChunkItem: first/rereleases with annotation
also simplify the logic for this function pretty nicely
Diffstat (limited to 'src/content/dependencies')
| -rw-r--r-- | src/content/dependencies/generateArtistInfoPageChunkItem.js | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/content/dependencies/generateArtistInfoPageChunkItem.js b/src/content/dependencies/generateArtistInfoPageChunkItem.js index 8117ca9a..45a39d46 100644 --- a/src/content/dependencies/generateArtistInfoPageChunkItem.js +++ b/src/content/dependencies/generateArtistInfoPageChunkItem.js @@ -54,11 +54,7 @@ export default { text: language.$(entryCapsule, 'rerelease.term'), tooltip: slots.rereleaseTooltip, }); - - return language.$(workingCapsule, workingOptions); - } - - if (!html.isBlank(slots.firstReleaseTooltip)) { + } else if (!html.isBlank(slots.firstReleaseTooltip)) { workingCapsule += '.firstRelease'; workingOptions.firstRelease = relations.textWithTooltip.slots({ @@ -66,29 +62,21 @@ export default { text: language.$(entryCapsule, 'firstRelease.term'), tooltip: slots.firstReleaseTooltip, }); - - return language.$(workingCapsule, workingOptions); - } - - let anyAccent = false; - - if (!empty(slots.otherArtistLinks)) { - anyAccent = true; + } else if (!empty(slots.otherArtistLinks)) { workingCapsule += '.withArtists'; workingOptions.artists = language.formatConjunctionList(slots.otherArtistLinks); } if (!html.isBlank(slots.annotation)) { - anyAccent = true; workingCapsule += '.withAnnotation'; workingOptions.annotation = slots.annotation; } - if (anyAccent) { - return language.$(workingCapsule, workingOptions); - } else { + if (workingCapsule === entryCapsule) { return slots.content; + } else { + return language.$(workingCapsule, workingOptions); } }), |