diff --git a/backend/test.xlsx b/backend/test.xlsx new file mode 100644 index 0000000..3eb5c6e Binary files /dev/null and b/backend/test.xlsx differ diff --git a/frontend/src/components/FileExplorer.tsx b/frontend/src/components/FileExplorer.tsx index 000a4f1..9acfcd3 100644 --- a/frontend/src/components/FileExplorer.tsx +++ b/frontend/src/components/FileExplorer.tsx @@ -8,7 +8,7 @@ import { MoreVertical, Star, Download, Pencil, Copy, Move, FolderPlus, ArrowUp, X, Check, RefreshCw, Info, Link as LinkIcon, Image as ImageIcon, Film as FilmIcon, Home, Sun, Moon, Music as MusicIcon, Code as CodeIcon, Archive as ArchiveIcon, CornerDownRight, - CheckCircle, AlertCircle, Menu, FileText, Presentation + CheckCircle, AlertCircle, Menu, FileText, Presentation, FileSpreadsheet } from 'lucide-react'; import api from '@/lib/api'; import { useIsMobile } from '@/hooks/useIsMobile'; @@ -1172,7 +1172,7 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) { if (ext === 'docx' || ext === 'doc') { return (
- W +
); } @@ -1180,15 +1180,15 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) { if (ext === 'pptx' || ext === 'ppt') { return (
- P +
); } if (ext === 'xlsx' || ext === 'xls') { return ( -
- X +
+
); } @@ -1951,7 +1951,10 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) { setEditingFile(file)} - onCreateBlank={(file) => setEditingFile(file)} + onCreateBlank={(file) => { + setEditingFile(file); + loadFiles(); + }} onPinChange={() => setPinnedRefreshCounter(c => c + 1)} /> ) : ( diff --git a/frontend/src/components/OfficeHome.tsx b/frontend/src/components/OfficeHome.tsx index d7bf363..1066313 100644 --- a/frontend/src/components/OfficeHome.tsx +++ b/frontend/src/components/OfficeHome.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useRef } from 'react'; -import { Plus, Pencil, Trash2, Pin } from 'lucide-react'; +import { Plus, Pencil, Trash2, Pin, FileText, Presentation, FileSpreadsheet } from 'lucide-react'; import api from '@/lib/api'; interface FileItem { @@ -23,8 +23,8 @@ interface OfficeHomeProps { // Custom Word icon (blue) function WordIcon({ className }: { className?: string }) { return ( -
- W +
+
); } @@ -32,8 +32,8 @@ function WordIcon({ className }: { className?: string }) { // Custom PowerPoint icon (orange) function PptIcon({ className }: { className?: string }) { return ( -
- P +
+
); } @@ -41,8 +41,8 @@ function PptIcon({ className }: { className?: string }) { // Custom Excel icon (green) function SheetIcon({ className }: { className?: string }) { return ( -
- X +
+
); } @@ -229,7 +229,7 @@ export default function OfficeHome({ type, onFileSelect, onCreateBlank, onPinCha