diff --git a/frontend/src/features/workspace/DocumentEditor.tsx b/frontend/src/features/workspace/DocumentEditor.tsx index 2142b77..6e40574 100644 --- a/frontend/src/features/workspace/DocumentEditor.tsx +++ b/frontend/src/features/workspace/DocumentEditor.tsx @@ -4,7 +4,7 @@ import { Users, Trash2, Download, - Folder as FolderIcon, + FileText, Radio, Loader2, ArrowLeft, @@ -162,7 +162,6 @@ export const DocumentEditor: React.FC = ({ const [loading, setLoading] = useState(!initialDoc); const [error, setError] = useState(null); const [showEmojiPicker, setShowEmojiPicker] = useState(false); - const [showFolderMenu, setShowFolderMenu] = useState(false); const [zoomedBlockId, setZoomedBlockId] = useState(null); const titleInputRef = useRef(null); @@ -543,18 +542,6 @@ export const DocumentEditor: React.FC = ({ } }; - const handleMoveToFolder = async (folderPath: string) => { - setShowFolderMenu(false); - if (!doc || !canEdit) return; - try { - const updated = await api.moveDocument(doc.id, folderPath); - setDoc(updated); - onDocMetadataChange(updated); - } catch { - // ignore - } - }; - const handleExportMarkdown = () => { const lines: string[] = [`# ${title || 'Unbenannte Notiz'}`, '']; for (const b of blocks) { @@ -626,46 +613,58 @@ export const DocumentEditor: React.FC = ({ )} - {/* Folder Selector */} -
- + - {showFolderMenu && canEdit && ( -
- - {availableFolders.map((folder) => ( - - ))} -
- )} -
+ {breadcrumbs.slice(1).map((crumb, idx) => { + const isCurrent = idx === breadcrumbs.length - 2; + return ( + + + {isCurrent ? ( + + {crumb.title || 'Punkt'} + + ) : ( + + )} + + ); + })} + + ) : ( +
+ + + {title || doc?.title || 'Dokument'} + +
+ )} {/* Read-only indicator */} {!canEdit && ( @@ -821,52 +820,6 @@ export const DocumentEditor: React.FC = ({ FOKUS-MODUS & ZOOM-IN (HOISTED SUBTREE VIEW) ========================================================================= */
- {/* Clickable Breadcrumb Bar */} - {breadcrumbs.length > 0 && ( - - )} - {/* Prominent Zoomed Ast-Heading */}
diff --git a/frontend/src/features/workspace/WorkspaceView.tsx b/frontend/src/features/workspace/WorkspaceView.tsx index d650a1a..647c293 100644 --- a/frontend/src/features/workspace/WorkspaceView.tsx +++ b/frontend/src/features/workspace/WorkspaceView.tsx @@ -19,6 +19,9 @@ import { Sparkles, ArrowLeft, CheckSquare, + PanelLeftClose, + PanelLeftOpen, + ChevronLeft, } from 'lucide-react'; import { Document, @@ -268,6 +271,23 @@ export const WorkspaceView: React.FC = ({ const [newFolderName, setNewFolderName] = useState(''); const [newFolderIsShared, setNewFolderIsShared] = useState(false); const [mobileShowDetail, setMobileShowDetail] = useState(Boolean(initialDocId)); + const [isSidebarCollapsed, setIsSidebarCollapsed] = useState(() => { + try { + return localStorage.getItem('mindsift:workspace_sidebar_collapsed') === 'true'; + } catch { + return false; + } + }); + + const toggleSidebar = useCallback(() => { + setIsSidebarCollapsed((prev) => { + const next = !prev; + try { + localStorage.setItem('mindsift:workspace_sidebar_collapsed', String(next)); + } catch {} + return next; + }); + }, []); // Drag and Drop state const [draggingDocId, setDraggingDocId] = useState(null); @@ -1003,117 +1023,155 @@ export const WorkspaceView: React.FC = ({ }, [tagsSummary, tagSearchQuery, tagSortBy]); return ( -
- {/* LEFT MASTER SIDEBAR */} -