diff options
-rw-r--r-- | src/content/dependencies/generateAdditionalFilesListChunk.js | 9 | ||||
-rw-r--r-- | src/strings-default.yaml | 2 | ||||
-rw-r--r-- | tap-snapshots/test/snapshot/generateAlbumAdditionalFilesList.js.test.cjs | 4 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/content/dependencies/generateAdditionalFilesListChunk.js b/src/content/dependencies/generateAdditionalFilesListChunk.js index a84d6992..f5a82197 100644 --- a/src/content/dependencies/generateAdditionalFilesListChunk.js +++ b/src/content/dependencies/generateAdditionalFilesListChunk.js @@ -32,10 +32,17 @@ export default { language.$(...titleParts, titleOptions))); const content = - html.tag('ul', slots.items); + html.tag('ul', + (html.isBlank(slots.items) + ? html.tag('li', + language.$('releaseInfo.additionalFiles.entry.noFilesAvailable')) + : slots.items)); const details = html.tag('details', + html.isBlank(slots.items) && + {open: true}, + [summary, content]); return html.tag('li', details); diff --git a/src/strings-default.yaml b/src/strings-default.yaml index 9b82d1d6..44bcbf70 100644 --- a/src/strings-default.yaml +++ b/src/strings-default.yaml @@ -326,6 +326,8 @@ releaseInfo: entry: _: "{TITLE}" withDescription: "{TITLE}: {DESCRIPTION}" + noFilesAvailable: >- + There are no files available or listed for this entry. file: _: "{FILE}" diff --git a/tap-snapshots/test/snapshot/generateAlbumAdditionalFilesList.js.test.cjs b/tap-snapshots/test/snapshot/generateAlbumAdditionalFilesList.js.test.cjs index 3442c974..24b72e04 100644 --- a/tap-snapshots/test/snapshot/generateAlbumAdditionalFilesList.js.test.cjs +++ b/tap-snapshots/test/snapshot/generateAlbumAdditionalFilesList.js.test.cjs @@ -28,9 +28,9 @@ exports[`test/snapshot/generateAlbumAdditionalFilesList.js > TAP > generateAlbum </details> </li> <li> - <details> + <details open> <summary><span>Empty Section: These files haven't been made available.</span></summary> - <ul></ul> + <ul><li>There are no files available or listed for this entry.</li></ul> </details> </li> <li> |