mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 01:48:04 +08:00
refactor(skill): remove Office file special handling, merge into unsupported
Remove the Office file placeholder that only showed "Preview will be supported in a future update" without any download option. Office files (pdf, doc, docx, xls, xlsx, ppt, pptx) now fall through to the generic "unsupported file" handler which provides a download button. Removed: - OfficeFilePlaceholder component - isOfficeFile function and OFFICE_EXTENSIONS constant - isOffice flag from useFileTypeInfo hook - i18n keys for officePlaceholder This simplifies the file type handling to just three categories: - Editable: markdown, code, text files → editor - Previewable: image, video files → media preview - Everything else: download button
This commit is contained in:
@ -1,17 +0,0 @@
|
||||
import type { FC } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
const OfficeFilePlaceholder: FC = () => {
|
||||
const { t } = useTranslation('workflow')
|
||||
|
||||
return (
|
||||
<div className="flex h-full w-full items-center justify-center text-text-tertiary">
|
||||
<span className="system-sm-regular">
|
||||
{t('skillEditor.officePlaceholder')}
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default React.memo(OfficeFilePlaceholder)
|
||||
Reference in New Issue
Block a user