diff --git a/CHANGELOG.md b/CHANGELOG.md index bf354c789..04eb791d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to ### Added +- ✨(frontend) show the user's workspaces (personal + shared/team drives) in the sidebar - ✨(backend) allow converting a file while it is being analyzed - ✨(frontend) add file type, contact and modification date topbar filters - ✨(frontend) add location, file type, contact and date search filters diff --git a/src/frontend/apps/drive/src/features/explorer/components/GlobalExplorerContext.tsx b/src/frontend/apps/drive/src/features/explorer/components/GlobalExplorerContext.tsx index 718f54c02..02ef28c3f 100644 --- a/src/frontend/apps/drive/src/features/explorer/components/GlobalExplorerContext.tsx +++ b/src/frontend/apps/drive/src/features/explorer/components/GlobalExplorerContext.tsx @@ -331,6 +331,18 @@ const TreeProviderInitializer = ({ }; items.push(favoritesNode); + + // The user's workspaces (root items) as top-level sidebar entries: the + // personal main workspace ("Espace de stockage") plus every shared/team + // drive they can access. Each node is lazily expandable through the tree's + // onLoadChildren handler, like any other item. + const workspaces = await getDriver().getItems({ type: ItemType.FOLDER }); + items.push( + ...(itemsToTreeItems( + workspaces.children, + ) as TreeViewDataType[]), + ); + treeContext?.treeData.resetTree(items); setTreeIsInitialized(true); };