Skip to content

Commit

Permalink
fix: files txtlist add some type
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuangs committed Sep 9, 2024
1 parent c536c63 commit baf830b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bytetrade/core",
"version": "0.3.61",
"version": "0.3.62",
"description": "didvault core module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function getFileIcon(fileName: string): string {
result = imgList.find((item) => item === suffix);
if (result) return 'image';
// txt
const txtList = ['txt'];
const txtList = ['txt', 'py', 'c', 'cpp', 'java', 'js', 'ts', 'php', 'sql', 'html', 'htm', 'css', 'sh', 'swift', 'm', 'cs', 'go', 'rb', 'pl', 'pm', 'lua', 'm', 'vbp', '.for', '.f90', 'pas', 'dpr', 'rs', 'asm', 'kt', 'r', 'sb3'];
result = txtList.find((item) => item === suffix);
if (result) return 'txt';
// excel
Expand Down Expand Up @@ -136,7 +136,7 @@ export function getFileType(fileName: string): string {
result = tiffList.find((item) => item === suffix);
if (result) return 'tiff';

const txtList = ['txt'];
const txtList = ['txt', 'py', 'c', 'cpp', 'java', 'js', 'ts', 'php', 'sql', 'html', 'htm', 'css', 'sh', 'swift', 'm', 'cs', 'go', 'rb', 'pl', 'pm', 'lua', 'm', 'vbp', '.for', '.f90', 'pas', 'dpr', 'rs', 'asm', 'kt', 'r', 'sb3'];
result = txtList.find((item) => item === suffix);
if (result) return 'txt';

Expand Down

0 comments on commit baf830b

Please sign in to comment.