Skip to content

Commit 8a00e9e

Browse files
committed
feat: refine sidebar UI and complete i18n for FolderModal (v0.3.2)
- Redesign sidebar collapse button to vertical capsule with hover effect - Show folder drag handles and more actions only when folder is selected - Complete i18n coverage for all FolderModal dialogs and toasts - Add clear search button in TopBar (closes #20) - Update version to 0.3.2 across all documentation - Add CollapsibleThinking component and useSmoothStream hook
1 parent e4cb465 commit 8a00e9e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/renderer/components/layout/Sidebar.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,12 @@ function SortableFolderItem({ folder, isActive, onSelect, onEdit, isOver, isLock
148148
style={style}
149149
className={`group relative flex items-center ${isDropOver ? 'bg-primary/20 rounded-lg ring-2 ring-primary' : ''}`}
150150
>
151-
{/* Drag handle - hidden in collapsed mode */}
152-
{!collapsed && (
151+
{/* Drag handle - only when selected & not collapsed */}
152+
{!collapsed && isActive && (
153153
<button
154154
{...attributes}
155155
{...listeners}
156-
className="p-1 cursor-grab active:cursor-grabbing opacity-0 group-hover:opacity-100 transition-opacity absolute left-0"
156+
className="p-1 cursor-grab active:cursor-grabbing opacity-60 hover:opacity-100 transition-opacity absolute left-0"
157157
>
158158
<GripVerticalIcon className="w-3 h-3 text-sidebar-foreground/40" />
159159
</button>
@@ -184,13 +184,13 @@ function SortableFolderItem({ folder, isActive, onSelect, onEdit, isOver, isLock
184184
)}
185185
</button>
186186

187-
{!collapsed && (
187+
{!collapsed && isActive && (
188188
<button
189189
onClick={(e) => {
190190
e.stopPropagation();
191191
onEdit();
192192
}}
193-
className="p-1 rounded opacity-0 group-hover:opacity-100 hover:bg-sidebar-accent transition-all absolute right-1"
193+
className="p-1 rounded opacity-70 hover:opacity-100 hover:bg-sidebar-accent transition-all absolute right-1"
194194
>
195195
<MoreHorizontalIcon className="w-4 h-4 text-sidebar-foreground/50" />
196196
</button>
@@ -342,7 +342,7 @@ export function Sidebar({ currentPage, onNavigate }: SidebarProps) {
342342
setIsCollapsed(!isCollapsed);
343343
closeTagPopover();
344344
}}
345-
className="h-6 w-6 rounded-full border border-border bg-background shadow-sm hover:shadow-md hover:bg-accent hover:text-accent-foreground flex items-center justify-center transition-all duration-200"
345+
className="h-12 w-7 rounded-full border border-border bg-background shadow-sm hover:shadow-md hover:bg-accent hover:text-accent-foreground flex items-center justify-center transition-all duration-200"
346346
title={isCollapsed ? t('common.expand', '展开') : t('common.collapse', '收起')}
347347
>
348348
{isCollapsed ? (

0 commit comments

Comments
 (0)