file_icons: Use separate icon key for JSON files (#24432)

This PR updates the file icon mappings for JSON (`.json`) file map to
the`json` key. Also, updates `.json` icon from `storage` to `code`.

This allows for the JSON file icons to be replaced in icon themes.

Release Notes:

- Icon themes: Added the ability to change the file icon for JSON
(`.json`) files.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This commit is contained in:
Sanjeev Shrestha 2025-02-07 21:59:26 +05:45 committed by GitHub
parent 07929229ae
commit c7cd5b019b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -101,7 +101,7 @@
"jpeg": "image",
"jpg": "image",
"js": "javascript",
"json": "storage",
"json": "json",
"jsonc": "storage",
"jsx": "react",
"jxl": "image",

View file

@ -88,6 +88,7 @@ const FILE_ICONS: &[(&str, &str)] = &[
("image", "icons/file_icons/image.svg"),
("java", "icons/file_icons/java.svg"),
("javascript", "icons/file_icons/javascript.svg"),
("json", "icons/file_icons/code.svg"),
("julia", "icons/file_icons/julia.svg"),
("kotlin", "icons/file_icons/kotlin.svg"),
("lock", "icons/file_icons/lock.svg"),