mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-28 13:31:32 +08:00
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:
parent
29a01ef49a
commit
8518734e48
@ -1194,7 +1194,8 @@
|
||||
"size": "Size",
|
||||
"text": "Text",
|
||||
"title": "Files",
|
||||
"type": "Type"
|
||||
"type": "Type",
|
||||
"video": "Video"
|
||||
},
|
||||
"gpustack": {
|
||||
"keep_alive_time": {
|
||||
|
||||
@ -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} /> }
|
||||
]
|
||||
|
||||
|
||||
@ -127,6 +127,10 @@ export type ImageFileMetadata = FileMetadata & {
|
||||
type: FileTypes.IMAGE
|
||||
}
|
||||
|
||||
export type VideoFileMetadata = FileMetadata & {
|
||||
type: FileTypes.VIDEO
|
||||
}
|
||||
|
||||
export type PdfFileMetadata = FileMetadata & {
|
||||
ext: '.pdf'
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user