From c7cd5b019b0497cab257f5095e2f4e18870acdd0 Mon Sep 17 00:00:00 2001 From: Sanjeev Shrestha Date: Fri, 7 Feb 2025 21:59:26 +0545 Subject: [PATCH] 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 --- assets/icons/file_icons/file_types.json | 2 +- crates/theme/src/icon_theme.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/icons/file_icons/file_types.json b/assets/icons/file_icons/file_types.json index 9580c8fd4e..f36ef2737f 100644 --- a/assets/icons/file_icons/file_types.json +++ b/assets/icons/file_icons/file_types.json @@ -101,7 +101,7 @@ "jpeg": "image", "jpg": "image", "js": "javascript", - "json": "storage", + "json": "json", "jsonc": "storage", "jsx": "react", "jxl": "image", diff --git a/crates/theme/src/icon_theme.rs b/crates/theme/src/icon_theme.rs index 1a99e42ed8..465391b26c 100644 --- a/crates/theme/src/icon_theme.rs +++ b/crates/theme/src/icon_theme.rs @@ -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"),