Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/features/tools/runners/common/ToolWorkspace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,18 @@ function ToolWorkspace({
</>
)}
{showHeaderActions && onReset && (
<button className="btn-reset-workspace bg-red-500/10 hover:bg-red-500/20 text-red-500 rounded-xl px-4 py-2 text-xs font-black uppercase tracking-widest transition-all flex items-center gap-2" onClick={onReset}>
<button
className="btn-reset-workspace bg-red-500/10 hover:bg-red-500/20 text-red-500 rounded-xl px-4 py-2 text-xs font-black uppercase tracking-widest transition-all flex items-center gap-2"
onClick={() => {
if (window.confirm('Are you sure you want to clear all files? This action cannot be undone.')) {
onReset();
}
}}
title="Clear all files from workspace"
aria-label="Clear all files from workspace"
>
<Trash2 size={14} />
<span>Clear_All</span>
<span>Clear All</span>
</button>
)}
</div>
Expand Down
12 changes: 10 additions & 2 deletions src/features/tools/runners/image/ImageResizeTool.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ToolWorkspace from '../common/ToolWorkspace';
import FileUploader from '../../../../components/ui/FileUploader';
import useParallelFileProcessor from '../../../../hooks/useParallelFileProcessor';
import FileThumbnail from '../../../../components/tools/shared/FileThumbnail';
import { Maximize, Settings, ImageIcon, Check } from 'lucide-react';
import { Maximize, Settings, ImageIcon, Check, X } from 'lucide-react';
import '../common/ToolWorkspace.css';

const getBaseName = (name) => name.replace(/\.[^/.]+$/, '');
Expand Down Expand Up @@ -179,7 +179,15 @@ function ImageResizeTool({ tool, onFilesAdded: parentOnFilesAdded }) {
<div className="text-slate-600 text-[10px] font-black uppercase tracking-widest">Queued</div>
)}
</div>
<button className="text-slate-500 hover:text-red-500 p-1 rounded-lg hover:bg-red-500/10 transition-colors" onClick={() => removeFile(id)} disabled={processing}>x</button>
<button
className="text-slate-500 hover:text-red-500 p-1 rounded-lg hover:bg-red-500/10 transition-colors"
onClick={() => removeFile(id)}
disabled={processing}
title={`Remove ${file.name}`}
aria-label={`Remove ${file.name}`}
>
<X size={14} />
</button>
</div>
</div>
))}
Expand Down
16 changes: 10 additions & 6 deletions src/features/tools/runners/pdf/PdfMergeTool.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import pdfService from '../../../../services/pdfService';
import serverProcessingService from '../../../../services/serverProcessingService';
import FileUploader from '../../../../components/ui/FileUploader';
import ToolWorkspace from '../common/ToolWorkspace';
import { FileText, ArrowUpDown, ChevronUp, ChevronDown, Eye } from 'lucide-react';
import { FileText, ArrowUpDown, ChevronUp, ChevronDown, Eye, X } from 'lucide-react';
import '../common/ToolWorkspace.css';

function PdfMergeTool({ tool, onFilesAdded: parentOnFilesAdded }) {
Expand Down Expand Up @@ -112,7 +112,8 @@ function PdfMergeTool({ tool, onFilesAdded: parentOnFilesAdded }) {
<button
className="btn-icon"
onClick={() => handlePreview(file)}
title="Preview PDF"
title={`Preview ${file.name}`}
aria-label={`Preview ${file.name}`}
>
<Eye size={16} />
</button>
Expand All @@ -121,25 +122,28 @@ function PdfMergeTool({ tool, onFilesAdded: parentOnFilesAdded }) {
className="btn-icon"
onClick={() => handleMove(i, -1)}
disabled={i === 0}
title="Move Up"
title={`Move ${file.name} Up`}
aria-label={`Move ${file.name} Up`}
>
<ChevronUp size={14} />
</button>
<button
className="btn-icon"
onClick={() => handleMove(i, 1)}
disabled={i === files.length - 1}
title="Move Down"
title={`Move ${file.name} Down`}
aria-label={`Move ${file.name} Down`}
>
<ChevronDown size={14} />
</button>
</div>
<button
className="btn-icon-danger"
onClick={() => setFiles(files.filter((_, idx) => idx !== i))}
title="Remove File"
title={`Remove ${file.name}`}
aria-label={`Remove ${file.name}`}
>
×
<X size={16} />
</button>
</div>
</div>
Expand Down
Loading