diff --git a/src/components/CodeEditor.jsx b/src/components/CodeEditor.jsx
index ee30230..64c0258 100755
--- a/src/components/CodeEditor.jsx
+++ b/src/components/CodeEditor.jsx
@@ -76,7 +76,7 @@ function CodeEditor({ file, onClose, projectPath }) {
const lineStart = pos;
const lineEnd = pos + oldLines[i].length;
builder.add(lineStart, lineEnd, Decoration.line({
- class: 'diff-removed-light'
+ class: isDarkMode ? 'diff-removed-dark' : 'diff-removed-light'
}));
pos += oldLines[i].length + 1;
}
@@ -171,7 +171,7 @@ function CodeEditor({ file, onClose, projectPath }) {
});
}
}
- }, [content, file.diffInfo, showDiff]);
+ }, [content, file.diffInfo, showDiff, isDarkMode]);
const handleSave = async () => {
setSaving(true);
@@ -242,14 +242,26 @@ function CodeEditor({ file, onClose, projectPath }) {
if (loading) {
return (
-
-
-
-
-
Loading {file.name}...
+ <>
+
+
+
+
+
+
Loading {file.name}...
+
-
+ >
);
}
@@ -288,7 +300,7 @@ function CodeEditor({ file, onClose, projectPath }) {
{file.diffInfo && (
-
+
{/* Footer */}
-
-
+
+
Lines: {content.split('\n').length}
Characters: {content.length}
Language: {file.name.split('.').pop()?.toUpperCase() || 'Text'}
-
+
Press Ctrl+S to save • Esc to close