Add OfficeHome with All Documents, context menu, custom icons, editor rename, text wrapping
Some checks failed
Automated Container Build / build-and-push (push) Failing after 1m13s
Some checks failed
Automated Container Build / build-and-push (push) Failing after 1m13s
This commit is contained in:
parent
e738a2cb72
commit
51850e75a2
5 changed files with 295 additions and 30 deletions
|
|
@ -1167,6 +1167,22 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (ext === 'docx' || ext === 'doc') {
|
||||
return (
|
||||
<div className={`${large ? 'w-20 h-20 rounded-2xl text-2xl' : 'w-5 h-5 rounded text-[6px] flex-shrink-0 aspect-square'} flex items-center justify-center font-black tracking-tighter shadow-sm text-white bg-[#2B579A]`}>
|
||||
W
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (ext === 'pptx' || ext === 'ppt') {
|
||||
return (
|
||||
<div className={`${large ? 'w-20 h-20 rounded-2xl text-2xl' : 'w-5 h-5 rounded text-[6px] flex-shrink-0 aspect-square'} flex items-center justify-center font-black tracking-tighter shadow-sm text-white bg-[#D24726]`}>
|
||||
P
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const fallbackIcon = (() => {
|
||||
if (isImage) {
|
||||
|
|
@ -1863,6 +1879,9 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
|
|||
file={editingFile}
|
||||
type={editingFile.name.endsWith('.docx') ? 'word' : editingFile.name.endsWith('.pptx') ? 'slide' : 'word'}
|
||||
onClose={() => setEditingFile(null)}
|
||||
onRename={(oldPath, newName, newPath) => {
|
||||
setEditingFile(prev => prev ? { ...prev, name: newName, path: newPath } : null);
|
||||
}}
|
||||
/>
|
||||
) : (appMode === 'docs' || appMode === 'slides') && activeSection === 'files' ? (
|
||||
<OfficeHome
|
||||
|
|
|
|||
Reference in a new issue