Compare commits

...

2 Commits

Author SHA1 Message Date
Jordan Bentley
3d5befc1df
Merge branch 'main' into session-new-folder-button 2025-08-04 15:06:27 +02:00
ghinkle
deb5ea3f15
Move add folder from a menu item to a button on the project 2025-07-30 11:33:25 -04:00

View File

@ -1,5 +1,5 @@
import { useState, useEffect, useRef, useCallback } from 'react';
import { ChevronRight, ChevronDown, Folder as FolderIcon, FolderOpen, Plus, Settings, GripVertical, Archive, GitBranch, RefreshCw, Play } from 'lucide-react';
import { ChevronRight, ChevronDown, Folder as FolderIcon, FolderOpen, Plus, Settings, GripVertical, Archive, GitBranch, RefreshCw, Play, FolderPlus } from 'lucide-react';
import { useSessionStore } from '../stores/sessionStore';
import { useErrorStore } from '../stores/errorStore';
import { useNavigationStore } from '../stores/navigationStore';
@ -1670,6 +1670,19 @@ export function DraggableProjectTreeView() {
<span>New Session</span>
</button>
<button
onClick={(e) => {
e.stopPropagation();
setSelectedProjectForFolder(project);
setShowCreateFolderDialog(true);
setNewFolderName('');
}}
className="p-1 hover:bg-surface-hover rounded transition-all opacity-0 group-hover:opacity-100"
title="Add folder"
>
<FolderPlus className="w-3 h-3 text-text-tertiary hover:text-text-primary" />
</button>
<button
onClick={(e) => handleRefreshProjectGitStatus(project, e)}
disabled={refreshingProjects.has(project.id)}
@ -1775,21 +1788,6 @@ export function DraggableProjectTreeView() {
})}
</div>
{/* Add folder button */}
<div className="ml-6 mt-2 border-t border-border-primary pt-2">
<button
onClick={(e) => {
e.stopPropagation();
setSelectedProjectForFolder(project);
setShowCreateFolderDialog(true);
setNewFolderName('');
}}
className="w-full px-2 py-1 text-xs text-text-secondary hover:text-text-primary hover:bg-surface-hover rounded transition-colors flex items-center space-x-1"
>
<Plus className="w-3 h-3" />
<span>Add Folder</span>
</button>
</div>
</div>
)}
</div>