Add official programming language icons and YAML support

- Install react-icons library for official technology icons
- Create getLanguageIcon function with 25+ language-specific icons
- Add official brand colors for each programming language:
  - JavaScript/JSX (yellow), TypeScript/TSX (blue)
  - Python (blue), Java (red), Go (cyan), Rust (orange)
  - HTML5 (orange), CSS3 (blue), SCSS/Sass (pink)
  - JSON (yellow), YAML (red), SQL (blue), etc.
- Add dedicated YAML file type support with official YAML icon
- Support special files: Dockerfile, Makefile, Gemfile
- Ensure YAML files get CodeMirror syntax highlighting and editing
- Update shouldShowAsText logic to include YAML files
- Maintain consistent professional appearance across all file types
This commit is contained in:
ZacharyZcR
2025-09-16 18:15:14 +08:00
parent 5e2d463678
commit 560b47532c
3 changed files with 99 additions and 5 deletions

View File

@@ -83,6 +83,7 @@
"react-dom": "^19.1.0",
"react-hook-form": "^7.60.0",
"react-i18next": "^15.7.3",
"react-icons": "^5.5.0",
"react-resizable-panels": "^3.0.3",
"react-simple-keyboard": "^3.8.120",
"react-xtermjs": "^1.0.10",