From 2c46dca0644c6ca8589b5b08b0c6de6836e77b19 Mon Sep 17 00:00:00 2001 From: Kuingsmile Date: Sat, 9 Dec 2023 19:03:11 -0800 Subject: [PATCH] :sparkles: Feature(custom): add preview support for more types of text file --- src/renderer/manage/utils/textfile.ts | 11 +++++-- supported_format.md | 44 +++++++++++++-------------- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/renderer/manage/utils/textfile.ts b/src/renderer/manage/utils/textfile.ts index effed7d..867a5c5 100644 --- a/src/renderer/manage/utils/textfile.ts +++ b/src/renderer/manage/utils/textfile.ts @@ -1,13 +1,16 @@ export const textFileExt = [ + '.applescript', '.bat', '.c', '.cmd', + '.condarc', '.conf', '.config', '.cpp', '.css', '.csv', '.dart', + '.eslintignore', '.gitattributes', '.gitconfig', '.gitignore', @@ -22,20 +25,24 @@ export const textFileExt = [ '.java', '.js', '.json', + '.jsx', + '.lock', '.log', '.php', '.prop', '.properties', + '.ps1', '.py', '.rc', '.sh', + '.ts', '.tsv', + '.tsx', '.txt', + '.vue', '.xml', '.yaml', '.yml', - '.ts', '.yarnrc', - '.condarc', 'license' ] diff --git a/supported_format.md b/supported_format.md index 19ba129..0672d10 100644 --- a/supported_format.md +++ b/supported_format.md @@ -10,27 +10,28 @@ ### 文本 -| 格式 | 描述 | 格式 | 描述 | -| :------------: | :-----------------: | :---------------: | :--------------: | -| .bat | 批处理文件 | .java | Java源代码文件 | -| .c | C语言源代码文件 | .js | JavaScript文件 | -| .cmd | Windows命令脚本文件 | .json | JSON文件 | -| .conf | 配置文件 | .log | 日志文件 | -| .config | 配置文件 | .php | PHP源代码文件 | -| .cpp | C++源代码文件 | .prop/.properties | 属性文件 | -| .css | 层叠样式表文件 | .py | Python源代码文件 | -| .csv | 逗号分隔值文件 | .rc | Windows资源文件 | -| .dart | Dart源代码文件 | .sh | Shell脚本文件 | -| .gitattributes | Git属性文件 | .tsv | 制表符分隔值文件 | -| .gitconfig | Git配置文件 | .txt | 纯文本文件 | -| .gitignore | Git忽略文件 | .xml | XML文件 | -| .gitkeep | Git保留文件 | .yaml/.yml | YAML文件 | -| .gitmodules | Git子模块文件 | .yarnrc | Yarn配置文件 | -| .go | Go源代码文件 | LICENSE | 许可证文件 | -| .h | 头文件 | .condarc | Conda配置文件 | -| .hpp | C++头文件 | .md | Markdown文件 | -| .htm/.html | HTML文件 | | | - +| 格式 | 描述 | 格式 | 描述 | +| :------------: | :-----------------: | :---------------: | :----------------: | +| .bat | 批处理文件 | .java | Java源代码文件 | +| .c | C语言源代码文件 | .js | JavaScript文件 | +| .cmd | Windows命令脚本文件 | .json | JSON文件 | +| .conf | 配置文件 | .log | 日志文件 | +| .config | 配置文件 | .php | PHP源代码文件 | +| .cpp | C++源代码文件 | .prop/.properties | 属性文件 | +| .css | 层叠样式表文件 | .py | Python源代码文件 | +| .csv | 逗号分隔值文件 | .rc | Windows资源文件 | +| .dart | Dart源代码文件 | .sh | Shell脚本文件 | +| .gitattributes | Git属性文件 | .tsv | 制表符分隔值文件 | +| .gitconfig | Git配置文件 | .txt | 纯文本文件 | +| .gitignore | Git忽略文件 | .xml | XML文件 | +| .gitkeep | Git保留文件 | .yaml/.yml | YAML文件 | +| .gitmodules | Git子模块文件 | .yarnrc | Yarn配置文件 | +| .go | Go源代码文件 | LICENSE | 许可证文件 | +| .h | 头文件 | .condarc | Conda配置文件 | +| .hpp | C++头文件 | .md | Markdown文件 | +| .htm/.html | HTML文件 | .jsx/.tsx/.vue | JSX文件等 | +| .applescript | AppleScript脚本文件 | .eslintignore | ESLint忽略文件 | +| .lock | 锁文件 | .ps1 | PowerShell脚本文件 | ### 视频 @@ -50,4 +51,3 @@ | .mxf | MXF视频文件 | .asf | Advanced Systems Format视频文件 | | .rm | RealMedia视频文件 | .rmvb | RealMedia可变比特率视频文件 | | .wmv | Windows Media视频文件 | .mkv | Matroska视频文件 | -