Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Commit 5ff942b

Browse files
author
laomo
committed
feat: add 'Copy the link' to sidebar note context menu
Right-click on a note in the sidebar now shows 'Copy the link' option, which copies the note's URL to clipboard. Fixes #313 (IssueHunt $50 bounty)
1 parent 6bc4a43 commit 5ff942b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/cloud/lib/hooks/sidebar/useCloudSidebarTree.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useCallback, useMemo } from 'react'
22
import {
33
mdiCog,
4+
mdiContentCopy,
45
mdiFileDocumentOutline,
56
mdiTextBoxPlus,
67
mdiFolderPlusOutline,
@@ -13,6 +14,7 @@ import {
1314
mdiTrashCanOutline,
1415
mdiViewDashboard,
1516
} from '@mdi/js'
17+
import copy from 'copy-to-clipboard'
1618
import { FoldingProps } from '../../../../design/components/atoms/FoldingWrapper'
1719
import { SidebarDragState } from '../../../../design/lib/dnd'
1820
import {
@@ -500,6 +502,12 @@ export function useCloudSidebarTree() {
500502
onClick: () =>
501503
toggleDocBookmark(doc.teamId, doc.id, doc.bookmarked),
502504
},
505+
{
506+
type: MenuTypes.Normal,
507+
icon: mdiContentCopy,
508+
label: translate(lngKeys.GeneralCopyTheLink),
509+
onClick: () => copy(href),
510+
},
503511
{
504512
type: MenuTypes.Normal,
505513
icon: mdiPencil,

0 commit comments

Comments
 (0)