From efeafbb725f944a33d5e1410dbe7fa692b9ec017 Mon Sep 17 00:00:00 2001 From: Babayaga Date: Tue, 7 Apr 2026 18:59:02 +0200 Subject: [PATCH] vfs --- packages/ui/src/App.tsx | 23 +- .../ui/src/modules/storage/FileBrowser.tsx | 28 +- .../modules/storage/FileBrowserContext.tsx | 24 +- .../src/modules/storage/FileBrowserPanel.tsx | 154 +++++++++- .../modules/storage/FileBrowserRibbonBar.tsx | 286 ++++++++++++++++++ .../ui/src/modules/storage/FileGridView.tsx | 212 +++++++------ .../ui/src/modules/storage/FileListView.tsx | 38 ++- packages/ui/src/modules/storage/FileTree.tsx | 55 +++- packages/ui/src/modules/storage/PanelSide.tsx | 11 +- .../ui/src/modules/storage/VfsContextMenu.tsx | 72 +++++ .../modules/storage/file-browser-commands.ts | 141 +++++++++ .../hooks/useDefaultKeyboardHandler.ts | 3 + .../storage/hooks/useKeyboardNavigation.ts | 17 +- .../src/modules/storage/hooks/useSelection.ts | 15 + .../storage/useRegisterVfsPanelActions.ts | 277 +++++++++++++++++ packages/ui/src/pages/PlaygroundVfs.tsx | 20 +- packages/ui/src/store/appStore.ts | 5 + 17 files changed, 1250 insertions(+), 131 deletions(-) create mode 100644 packages/ui/src/modules/storage/FileBrowserRibbonBar.tsx create mode 100644 packages/ui/src/modules/storage/VfsContextMenu.tsx create mode 100644 packages/ui/src/modules/storage/file-browser-commands.ts create mode 100644 packages/ui/src/modules/storage/useRegisterVfsPanelActions.ts diff --git a/packages/ui/src/App.tsx b/packages/ui/src/App.tsx index 65dd00db..286f9325 100644 --- a/packages/ui/src/App.tsx +++ b/packages/ui/src/App.tsx @@ -119,7 +119,20 @@ const AppWrapper = () => { const isPageEditor = location.pathname.includes('/pages/') && searchParams.get('edit') === 'true'; const isFullScreenPage = location.pathname.startsWith('/video-feed') || isPageEditor; - const containerClassName = isFullScreenPage + const isFileBrowserShellRoute = + location.pathname.startsWith('/app/filebrowser') || + location.pathname.startsWith('/playground/vfs'); + const fileBrowserImmersive = useAppStore((s) => s.fileBrowserImmersive); + const setFileBrowserImmersive = useAppStore((s) => s.setFileBrowserImmersive); + + React.useEffect(() => { + if (!isFileBrowserShellRoute) setFileBrowserImmersive(false); + }, [location.pathname, isFileBrowserShellRoute, setFileBrowserImmersive]); + + const hideAppChrome = + isFullScreenPage || (fileBrowserImmersive && isFileBrowserShellRoute); + + const containerClassName = hideAppChrome ? "flex flex-col min-h-svh transition-colors duration-200 h-full" : "mx-auto max-w-[1400px] flex flex-col min-h-svh transition-colors duration-200 h-full"; @@ -128,9 +141,9 @@ const AppWrapper = () => { const ecommerce = import.meta.env.VITE_ENABLE_ECOMMERCE === 'true'; return (
- {!isFullScreenPage && } + {!hideAppChrome && } -
+
{/* Top-level routes (no organization context) */} } /> @@ -230,7 +243,7 @@ const AppWrapper = () => { Loading...
}>} /> - {!isFullScreenPage && showGlobalFooter &&