From 9454ad28eae1b63c253f1bd9dd1ece1db4c936f7 Mon Sep 17 00:00:00 2001 From: Elijah Date: Mon, 25 May 2026 10:07:04 -0700 Subject: [PATCH] Icon redesign and xlsx aspect ratio update --- backend/test.xlsx | Bin 0 -> 2221 bytes frontend/src/components/FileExplorer.tsx | 15 +++++++++------ frontend/src/components/OfficeHome.tsx | 18 +++++++++--------- 3 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 backend/test.xlsx diff --git a/backend/test.xlsx b/backend/test.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..3eb5c6e0e50ec9ae185908b6d8c599020068d28c GIT binary patch literal 2221 zcmd^AL2uJA6i!zNZIUrP;PJ#|;nt*DI6HLP-ZW}dmBHJ6CxJ+Dj zMdHS7KVwJ4Z{WzkfIH82+caLgRfQX^+%$>b^XKpT-g9TWd}ZBHpSzv2w`X5ZKR;e^ z95rshvo}vuCMlEqyGI!nd)_dKn;Y=s9#Sr%l=-Oc)sRbBkcJWK`RMiTv+5({3Q1T< z;*?Pz9Z`WcT5C<6!i8WaeAJgRYhWybK23=5(u^{A(@l9oB;4{I&PXsIJ&GUHY7cQ> zU{s}ofm&;>+icS=If$jZIRtgE$ zBA&=NC86k3DwEjLS1%zEn?ip91U+A1eX0LrENY87@fb=IYwcT|g4gy=etGvxj-$pk z@Y=qT4=X9e(jMEH)^SO%6}(`)Hl5bp3Vp=4!a8z|#V)t9QLa5w&N#ZT3NFro%!K!- z^pR~CaAgxuqY)OVKfbR%zXOD-aUDpt5-d&Z*tUyvTJWdYv$7{L85(?%9#EuZ2609n zV`f#b&=>TL%XGoLQq=)M>1Rqe_|F^BSU^+brU-;$cDzfA)Zg#QpQ=Ep8n+Fp#;oJ{ zs(}7a<4$Tl_w3|Rp}kz{+>(2Z$751h-$Ka-!C#;>oZj>h6agIwd9Me;6(+;$oK_2+6e6BUv!M5r1 n;F}d4Jf{TgJhrZRo{y^&5a(3xY**l|<5b|g2}JE&Rd;^?gGs^> literal 0 HcmV?d00001 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