diff --git a/src/components/Shakespeare/FileEditor.tsx b/src/components/Shakespeare/FileEditor.tsx index 3e79d416..a106bab5 100644 --- a/src/components/Shakespeare/FileEditor.tsx +++ b/src/components/Shakespeare/FileEditor.tsx @@ -3,9 +3,10 @@ import { useTranslation } from 'react-i18next'; import { Button } from '@/components/ui/button'; import { Textarea } from '@/components/ui/textarea'; import { CardContent, CardHeader, CardTitle } from '@/components/ui/card'; -import { Save, Loader2 } from 'lucide-react'; +import { Save, Loader2, ImageOff } from 'lucide-react'; import { cn } from '@/lib/utils'; import { useGitStatus } from '@/hooks/useGitStatus'; +import { isMediaFile } from '@/lib/fileUtils'; interface FileEditorProps { filePath: string; @@ -93,6 +94,7 @@ export function FileEditor({ filePath, content, onSave, isLoading, projectId }: // Get git status for the current file const currentFileGitStatus = getFileGitStatus(filePath); const gitStatusClasses = getGitStatusClasses(currentFileGitStatus); + const isMedia = isMediaFile(filePath); return (
@@ -100,32 +102,36 @@ export function FileEditor({ filePath, content, onSave, isLoading, projectId }:
{filePath}
- {hasChanges && ( + {hasChanges && !isMedia && ( {t('unsavedChanges')} )} - + {!isMedia && ( + + )}
-
- {t('languageLabel')}: {getLanguageFromPath(filePath)} -
+ {!isMedia && ( +
+ {t('languageLabel')}: {getLanguageFromPath(filePath)} +
+ )} @@ -133,6 +139,10 @@ export function FileEditor({ filePath, content, onSave, isLoading, projectId }:
+ ) : isMedia ? ( +
+ +
) : (