From f72cb14e1890755957edb0e2c7b9a5ff1a9a9cc2 Mon Sep 17 00:00:00 2001 From: chanx <1243304602@qq.com> Date: Thu, 6 Aug 2026 16:22:32 +0800 Subject: [PATCH] feat: add json file preview and icon (#17930) --- web/public/iconfont.js | 13 +++++++------ web/src/components/document-preview/index.tsx | 2 +- web/src/constants/file.ts | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/web/public/iconfont.js b/web/public/iconfont.js index 0f84c0258c..36b3dbda3f 100644 --- a/web/public/iconfont.js +++ b/web/public/iconfont.js @@ -2,9 +2,10 @@ ((window._iconfont_svg_string_4909832 = '' + ` + - + @@ -18,7 +19,7 @@ - + @@ -36,7 +37,7 @@ - + @@ -52,7 +53,7 @@ - + @@ -61,7 +62,7 @@ - + @@ -69,7 +70,7 @@ - + diff --git a/web/src/components/document-preview/index.tsx b/web/src/components/document-preview/index.tsx index e94d2e7347..eeebfc3cfa 100644 --- a/web/src/components/document-preview/index.tsx +++ b/web/src/components/document-preview/index.tsx @@ -42,7 +42,7 @@ const DocumentPreview = function ({ )} - {['txt'].indexOf(fileType) > -1 && ( + {['txt', 'json'].indexOf(fileType) > -1 && (
diff --git a/web/src/constants/file.ts b/web/src/constants/file.ts index 9b713e3d70..a6809703c6 100644 --- a/web/src/constants/file.ts +++ b/web/src/constants/file.ts @@ -18,4 +18,5 @@ export const FileIconMap = { mkv: 'mkv', rmvb: 'rmvb', wav: 'wav', + json: 'json', };