Skip to content

Commit fb8f0d6

Browse files
authored
improvement(files): improve file sharing UI (#6983)
1 parent 8c7a2f1 commit fb8f0d6

6 files changed

Lines changed: 887 additions & 127 deletions

File tree

apps/sim/app/workspace/[workspaceId]/files/components/file-row-context-menu/file-row-context-menu.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
FolderInput,
1616
Pencil,
1717
} from '@sim/emcn'
18-
import { Download, Link, Pin, Trash } from '@sim/emcn/icons'
18+
import { Download, Link, Pin, Send, Trash } from '@sim/emcn/icons'
1919
import type { MoveOptionNode } from '@/app/workspace/[workspaceId]/components/folders'
2020
import { renderMoveOption } from '@/app/workspace/[workspaceId]/components/folders'
2121

@@ -24,6 +24,7 @@ interface FileRowContextMenuProps {
2424
position: { x: number; y: number }
2525
onClose: () => void
2626
onOpen: () => void
27+
onCopyLink?: () => void
2728
onDownload?: () => void
2829
onRename: () => void
2930
onDelete: () => void
@@ -42,6 +43,7 @@ export const FileRowContextMenu = memo(function FileRowContextMenu({
4243
position,
4344
onClose,
4445
onOpen,
46+
onCopyLink,
4547
onDownload,
4648
onRename,
4749
onDelete,
@@ -87,6 +89,12 @@ export const FileRowContextMenu = memo(function FileRowContextMenu({
8789
Open
8890
</DropdownMenuItem>
8991
)}
92+
{!isMultiSelect && onCopyLink && (
93+
<DropdownMenuItem onSelect={onCopyLink}>
94+
<Link />
95+
Copy Link
96+
</DropdownMenuItem>
97+
)}
9098
{onDownload && (
9199
<DropdownMenuItem onSelect={onDownload}>
92100
<Download />
@@ -109,7 +117,7 @@ export const FileRowContextMenu = memo(function FileRowContextMenu({
109117
)}
110118
{!isMultiSelect && onShare && (
111119
<DropdownMenuItem onSelect={onShare}>
112-
<Link />
120+
<Send />
113121
Share
114122
</DropdownMenuItem>
115123
)}

0 commit comments

Comments
 (0)