feat(files-block): icons for tsv/json/xml/py/js/ts/rs/sh
Deploy / verify (push) Successful in 39s
Deploy / deploy (push) Successful in 59s

iconForExt now matches the backend's expanded ALLOWED_EXTENSIONS:
- tsv routes to the excel-box icon (alongside csv).
- json → mdi:code-json, xml/html → mdi:xml.
- py → mdi:language-python; js/ts/jsx/tsx → language-javascript;
  rs → language-rust; sh/bash → console.

Visitors who download a CMS-hosted dataset, source dump or archive
now see a meaningful icon instead of the generic file-outline
fallback.
This commit is contained in:
Peter Meier
2026-04-25 11:21:40 +02:00
parent 9eab404240
commit 942b9feefa
@@ -38,6 +38,7 @@
case "xlsx": case "xlsx":
case "ods": case "ods":
case "csv": case "csv":
case "tsv":
return "mdi:file-excel-box"; return "mdi:file-excel-box";
case "ppt": case "ppt":
case "pptx": case "pptx":
@@ -57,6 +58,24 @@
case "txt": case "txt":
case "md": case "md":
return "mdi:file-document-outline"; return "mdi:file-document-outline";
case "json":
return "mdi:code-json";
case "xml":
case "html":
case "htm":
return "mdi:xml";
case "py":
return "mdi:language-python";
case "js":
case "ts":
case "tsx":
case "jsx":
return "mdi:language-javascript";
case "rs":
return "mdi:language-rust";
case "sh":
case "bash":
return "mdi:console";
default: default:
return "mdi:file-outline"; return "mdi:file-outline";
} }