diff options
| author | diogo464 <[email protected]> | 2025-08-14 15:11:09 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-08-14 15:11:09 +0100 |
| commit | 6b0aa089624fdce5521670ba460a1f8870b1bb4f (patch) | |
| tree | 09b81bf1c2a228eeec96903ab827cae0d568adac | |
| parent | 912bef7608aab286a5cc82c8ac9e2e19b19b5f1c (diff) | |
feat: make file paths clickable for create_file actions in history
- Add clickable download links for create_file entries in history table
- Use blob endpoint with proper filename parameter for downloads
- Apply blue link styling with hover effects for better UX
- Only make paths clickable when blob_id is available and valid
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
| -rw-r--r-- | frontend/components/history/HistoryView.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/frontend/components/history/HistoryView.tsx b/frontend/components/history/HistoryView.tsx index 1fe3cd2..b01e4c6 100644 --- a/frontend/components/history/HistoryView.tsx +++ b/frontend/components/history/HistoryView.tsx | |||
| @@ -115,7 +115,16 @@ export function HistoryView({ entries, currentPage, hasNextPage, hasPrevPage, to | |||
| 115 | {entry.email} | 115 | {entry.email} |
| 116 | </TableCell> | 116 | </TableCell> |
| 117 | <TableCell className="font-mono text-sm max-w-md truncate"> | 117 | <TableCell className="font-mono text-sm max-w-md truncate"> |
| 118 | {entry.path} | 118 | {entry.action === "create_file" && entry.blob_id !== "-" ? ( |
| 119 | <Link | ||
| 120 | href={`/blob/${entry.blob_id}?filename=${encodeURIComponent(entry.path.split('/').pop() || 'download')}`} | ||
| 121 | className="text-blue-600 hover:text-blue-800 hover:underline" | ||
| 122 | > | ||
| 123 | {entry.path} | ||
| 124 | </Link> | ||
| 125 | ) : ( | ||
| 126 | entry.path | ||
| 127 | )} | ||
| 119 | </TableCell> | 128 | </TableCell> |
| 120 | <TableCell> | 129 | <TableCell> |
| 121 | {formatFileSize(entry.size)} | 130 | {formatFileSize(entry.size)} |
