diff options
| -rw-r--r-- | frontend/file-drive.tsx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/frontend/file-drive.tsx b/frontend/file-drive.tsx index 7a59def..1e14c78 100644 --- a/frontend/file-drive.tsx +++ b/frontend/file-drive.tsx | |||
| @@ -322,7 +322,18 @@ export default function FileDrive() { | |||
| 322 | ) : ( | 322 | ) : ( |
| 323 | <File className="h-4 w-4 text-gray-500" /> | 323 | <File className="h-4 w-4 text-gray-500" /> |
| 324 | )} | 324 | )} |
| 325 | <span>{item.name}</span> | 325 | {item.type === "file" && item.blob ? ( |
| 326 | <a | ||
| 327 | href={`/blob/${item.blob}?filename=${encodeURIComponent(item.name)}`} | ||
| 328 | className="text-blue-600 hover:text-blue-800 hover:underline cursor-pointer" | ||
| 329 | target="_blank" | ||
| 330 | rel="noopener noreferrer" | ||
| 331 | > | ||
| 332 | {item.name} | ||
| 333 | </a> | ||
| 334 | ) : ( | ||
| 335 | <span>{item.name}</span> | ||
| 336 | )} | ||
| 326 | </div> | 337 | </div> |
| 327 | </TableCell> | 338 | </TableCell> |
| 328 | <TableCell>{formatFileSize(item.size || 0)}</TableCell> | 339 | <TableCell>{formatFileSize(item.size || 0)}</TableCell> |
