feat(constant): add Godot scene files(.tscn) (#8362)

* feat(constant): add Godot scene files(.tscn)

* fix(AttachmentPreview): consolidate file extension checks
This commit is contained in:
George·Dong
2025-07-22 00:45:13 +08:00
committed by GitHub
parent 8c58060716
commit 8bf84b26f3
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -348,7 +348,8 @@ const textExtsByCategory = new Map([
'.x3d', // X3D文件
'.gltf', // glTF JSON
'.prefab', // Unity预制体 (YAML格式)
'.meta' // Unity元数据文件 (YAML格式)
'.meta', // Unity元数据文件 (YAML格式)
'.tscn' // Godot场景文件
]
],
[
@@ -61,7 +61,7 @@ export const getFileIcon = (type?: string) => {
return <FileZipFilled />
}
if (['.txt', '.json', '.log', '.yml', '.yaml', '.xml', '.csv'].includes(ext)) {
if (['.txt', '.json', '.log', '.yml', '.yaml', '.xml', '.csv', '.tscn', '.gd'].includes(ext)) {
return <FileTextFilled />
}