this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Hide Share menu entry when sharing is unavailable

buildFileItems was always emitting the "Share…" row regardless of
whether props.onShare was defined. In workspace context PanelContent
passes onShare=undefined (lexicon for workspace-scoped sharing isn't
in the protocol yet), so DropdownMenu was rendering a dead entry that
did nothing on click. Gate the row on props.onShare like the other
conditional actions above it.

+6 -1
+6 -1
apps/web/src/components/cabinet/FileActionMenu.tsx
··· 55 55 ...(props.onEdit ? [{ icon: NotePencilIcon, label: "Edit", onClick: props.onEdit }] : []), 56 56 ...(props.onPreview ? [{ icon: EyeIcon, label: "Preview", onClick: props.onPreview }] : []), 57 57 { icon: PencilSimpleIcon, label: "Edit details", onClick: props.onEditMetadata }, 58 - { icon: ShareNetworkIcon, label: "Share\u2026", onClick: props.onShare }, 58 + // Share is gated by allowSharing upstream — the lexicon for workspace- 59 + // scoped sharing isn't in the protocol yet, so onShare is undefined in 60 + // workspace contexts and the menu entry is suppressed. 61 + ...(props.onShare 62 + ? [{ icon: ShareNetworkIcon, label: "Share\u2026", onClick: props.onShare }] 63 + : []), 59 64 ...(props.onManageSharing 60 65 ? [ 61 66 {