diff --git a/src/ui/components/chat/message-input.tsx b/src/ui/components/chat/message-input.tsx index ce0f099b..c7079b44 100644 --- a/src/ui/components/chat/message-input.tsx +++ b/src/ui/components/chat/message-input.tsx @@ -746,7 +746,7 @@ export const ChatInput = React.forwardRef( className={`p-2 rounded-full transition-all duration-200 flex items-center justify-center shrink-0 ${ canSend && !isUploading ? 'bg-blue-600 text-white shadow-md hover:bg-blue-700 hover:shadow-lg transform hover:-translate-y-0.5' - : 'bg-primary text-gray-400 cursor-not-allowed' + : 'bg-gray-400 cursor-not-allowed' }`} > diff --git a/src/ui/components/folder-tree.tsx b/src/ui/components/folder-tree.tsx index a663de01..a3a4206a 100644 --- a/src/ui/components/folder-tree.tsx +++ b/src/ui/components/folder-tree.tsx @@ -5,6 +5,7 @@ import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from '@tansta import { useMatch, useNavigate, useParams } from '@tanstack/react-router' import { ChevronDown, + ChevronUp, ChevronRight, Clapperboard, Folder, @@ -53,6 +54,10 @@ export function FolderTree({ shouldThrow: false, }) + const [isAssetsExpanded, setIsAssetsExpanded] = useState(true) + const [isCollectionsExpanded, setIsCollectionsExpanded] = useState(true) + const [isSharesExpanded, setIsSharesExpanded] = useState(true) + const { data: shareLinksData } = useQuery({ queryKey: ['shares', projectId], queryFn: async () => { @@ -141,72 +146,103 @@ export function FolderTree({ const shareLinks = shareLinksData?.data ?? [] return ( -
-
-
-
-

- Assets -

- +
+ + {isAssetsExpanded && ( +
+ +
+ navigate({ + to: '/projects/$projectId/recently-deleted', + params: { projectId }, + }) + } + > +
+ +
+ Recently Deleted +
+
+ )} +
+ + {!hideCollections && ( +
+
+
setIsCollectionsExpanded(!isCollectionsExpanded)} + > +

Collections

+ {isCollectionsExpanded ? ( + + ) : ( + + )} +
+
- -
- navigate({ - to: '/projects/$projectId/recently-deleted', - params: { projectId }, - }) - } - > -
- -
- Recently Deleted -
-
- {!hideCollections && ( -
-
-

- Collections -

- -
- -
+ {isCollectionsExpanded && ( +
{collectionsData?.data.map((collection) => (
))}
-
- )} + )} +
+ )} - {!hideShares && ( -
-
-

- Share Links -

-
- -
-
+ {!hideShares && ( +
+
+
setIsSharesExpanded(!isSharesExpanded)} + > +

Share Links

+ {isSharesExpanded ? ( + + ) : ( + + )} +
+
+ +
+
-
+ {isSharesExpanded && ( +
@@ -263,9 +314,9 @@ export function FolderTree({ /> ))}
-
- )} -
+ )} +
+ )}
) }