-
Large File Warning
-
+
Large File Warning
+
This file is {formatFileSize(file.size)} in size, which may cause performance issues when opened as text.
{isTooLarge ? (
@@ -213,7 +213,7 @@ export function FileViewer({
) : (
-
+
Do you want to continue opening this file as text? This may slow down your browser.
)}
@@ -277,8 +277,8 @@ export function FileViewer({
onChange={(e) => handleContentChange(e.target.value)}
className={cn(
"w-full h-full p-4 border-none resize-none outline-none",
- "font-mono text-sm bg-white",
- fileTypeInfo.type === 'code' && "bg-gray-900 text-gray-100"
+ "font-mono text-sm bg-background text-foreground",
+ fileTypeInfo.type === 'code' && "bg-muted text-foreground"
)}
placeholder="Start typing..."
spellCheck={false}
@@ -286,7 +286,7 @@ export function FileViewer({
) : (
{content || 'File is empty'}
@@ -328,8 +328,8 @@ export function FileViewer({
{/* 未知文件类型 - 只在不能显示为文本且没有警告时显示 */}
{fileTypeInfo.type === 'unknown' && !shouldShowAsText && !showLargeFileWarning && (
-
-
+
+
Cannot preview this file type
This file type is not supported for preview. You can download it to view in an external application.
@@ -350,7 +350,7 @@ export function FileViewer({
{/* 底部状态栏 */}
-
+
{file.path}
{hasChanges && (