feat(files-block): icons for tsv/json/xml/py/js/ts/rs/sh
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:
@@ -38,6 +38,7 @@
|
||||
case "xlsx":
|
||||
case "ods":
|
||||
case "csv":
|
||||
case "tsv":
|
||||
return "mdi:file-excel-box";
|
||||
case "ppt":
|
||||
case "pptx":
|
||||
@@ -57,6 +58,24 @@
|
||||
case "txt":
|
||||
case "md":
|
||||
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:
|
||||
return "mdi:file-outline";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user