feat(files): add video file type support

Add video file type metadata and UI components to support video files in the files page
This commit is contained in:
icarus 2025-10-13 15:11:12 +08:00
parent 29a01ef49a
commit 8518734e48
3 changed files with 9 additions and 2 deletions

View File

@ -1194,7 +1194,8 @@
"size": "Size",
"text": "Text",
"title": "Files",
"type": "Type"
"type": "Type",
"video": "Video"
},
"gpustack": {
"keep_alive_time": {

View File

@ -19,7 +19,8 @@ import {
File as FileIcon,
FileImage,
FileText,
FileType as FileTypeIcon
FileType as FileTypeIcon,
FileVideo
} from 'lucide-react'
import { FC, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
@ -138,6 +139,7 @@ const FilesPage: FC = () => {
{ key: FileTypes.DOCUMENT, label: t('files.document'), icon: <FileIcon size={16} /> },
{ key: FileTypes.IMAGE, label: t('files.image'), icon: <FileImage size={16} /> },
{ key: FileTypes.TEXT, label: t('files.text'), icon: <FileTypeIcon size={16} /> },
{ key: FileTypes.VIDEO, label: t('files.video'), icon: <FileVideo size={16} /> },
{ key: 'all', label: t('files.all'), icon: <FileText size={16} /> }
]

View File

@ -127,6 +127,10 @@ export type ImageFileMetadata = FileMetadata & {
type: FileTypes.IMAGE
}
export type VideoFileMetadata = FileMetadata & {
type: FileTypes.VIDEO
}
export type PdfFileMetadata = FileMetadata & {
ext: '.pdf'
}