From 73a0b5bebd6950e730b954dc0c11c4b82e5f3a2c Mon Sep 17 00:00:00 2001 From: Yuanbo Li Date: Wed, 26 Nov 2025 11:45:01 +0800 Subject: [PATCH] [FixBug] The Desktop version's "New Project" button is wrapped by the conditional logic projects.length > 0, causing it to not display when there are no projects, preventing users from creating new projects. --- src/components/Sidebar.jsx | 72 ++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/src/components/Sidebar.jsx b/src/components/Sidebar.jsx index 8a160ccd..926379fd 100644 --- a/src/components/Sidebar.jsx +++ b/src/components/Sidebar.jsx @@ -581,9 +581,44 @@ function Sidebar({ - {/* Search Filter and Actions */} + {/* Action Buttons - Desktop only - Always show when not loading */} + {!isLoading && !isMobile && ( +
+
+ + +
+
+ )} + + {/* Search Filter - Only show when there are projects */} {projects.length > 0 && !isLoading && ( -
+
)}
- - {/* Action Buttons - Desktop only */} - {!isMobile && ( -
- - -
- )}
)}