« get me outta code hell

content: generateAdditionalFilesListChunk: message for no files - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-02 17:15:22 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-04-02 17:15:45 -0300
commit86dcca95772d98350171962de786053466db043c (patch)
tree294f0dd219d3eaca4cde053e4597380b54fd7507 /src/content
parent224211c2e5d1fcfa0de0c1155f747b66dd597517 (diff)
content: generateAdditionalFilesListChunk: message for no files
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateAdditionalFilesListChunk.js9
1 files changed, 8 insertions, 1 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);