diff --git a/src/features/quickLinks/components/quickLink/QuickLinkContextMenuContent.tsx b/src/features/quickLinks/components/quickLink/QuickLinkContextMenuContent.tsx
index 6ab7bc0..2fb9cc2 100644
--- a/src/features/quickLinks/components/quickLink/QuickLinkContextMenuContent.tsx
+++ b/src/features/quickLinks/components/quickLink/QuickLinkContextMenuContent.tsx
@@ -64,7 +64,7 @@ export const QuickLinkContextMenuContent = forwardRef<
Edit
-
+
{
diff --git a/src/features/shared/contextMenuItems/CopyTextMenuItem.tsx b/src/features/shared/contextMenuItems/CopyTextMenuItem.tsx
index 6b9de20..9922e7e 100644
--- a/src/features/shared/contextMenuItems/CopyTextMenuItem.tsx
+++ b/src/features/shared/contextMenuItems/CopyTextMenuItem.tsx
@@ -1,13 +1,16 @@
import { ContextMenuItem } from "@src/components/ui/context-menu"
import { useToast } from "@src/components/ui/use-toast"
import { CopyIcon } from "lucide-react"
+import React from "react"
interface CopyTextMenuItemProps {
+ icon?: React.ReactNode
textToCopy: string
name: string
}
export default function CopyTextMenuItem({
+ icon,
textToCopy,
name,
}: CopyTextMenuItemProps) {
@@ -24,7 +27,8 @@ export default function CopyTextMenuItem({
return (
- Copy {name}
+ {icon || }
+ {name}
)
}
diff --git a/src/features/table/fileCard/contextMenu/CopyMenuSub.tsx b/src/features/table/fileCard/contextMenu/CopyMenuSub.tsx
new file mode 100644
index 0000000..275a5d6
--- /dev/null
+++ b/src/features/table/fileCard/contextMenu/CopyMenuSub.tsx
@@ -0,0 +1,38 @@
+import {
+ ContextMenuSub,
+ ContextMenuSubContent,
+ ContextMenuSubTrigger,
+} from "@src/components/ui/context-menu"
+import { FullFileLink } from "@src/features/parser"
+import CopyTextMenuItem from "@src/features/shared/contextMenuItems/CopyTextMenuItem"
+import { CopyIcon, FileTextIcon, LinkIcon, TerminalIcon } from "lucide-react"
+
+export function CopyMenuSub({ fileLink }: { fileLink: FullFileLink }) {
+ return (
+
+
+ Copy
+
+
+ }
+ name="URL"
+ textToCopy={fileLink.href}
+ />
+ }
+ name="Name"
+ textToCopy={fileLink.fullName}
+ />
+ }
+ name="Path"
+ textToCopy={
+ "/cs/studres/_this_session/" +
+ fileLink.urlSegments.join("/")
+ }
+ />
+
+
+ )
+}
diff --git a/src/features/table/fileCard/contextMenu/FileCardContextMenu.tsx b/src/features/table/fileCard/contextMenu/FileCardContextMenu.tsx
index bc798bb..2f675e3 100644
--- a/src/features/table/fileCard/contextMenu/FileCardContextMenu.tsx
+++ b/src/features/table/fileCard/contextMenu/FileCardContextMenu.tsx
@@ -10,9 +10,9 @@ import {
} from "@src/features/files"
import { FullFileLink } from "@src/features/parser"
import useSmoothRouter from "@src/features/router/useSmoothRouter"
-import CopyTextMenuItem from "@src/features/shared/contextMenuItems/CopyTextMenuItem"
import { AddNoteContextMenuItem } from "@src/features/table/fileCard/contextMenu/AddNoteContextMenuItem"
import { AddQuickLinkMenuItem } from "@src/features/table/fileCard/contextMenu/AddQuickLinkMenuItem"
+import { CopyMenuSub } from "@src/features/table/fileCard/contextMenu/CopyMenuSub"
import DownloadUsingScpContextMenuItem from "@src/features/table/fileCard/contextMenu/DownloadUsingScpContextMenuItem"
import { FolderIcon, FolderRootIcon } from "lucide-react"
import { forwardRef } from "react"
@@ -62,8 +62,8 @@ const FileCardContextMenuContent = forwardRef<
-
-
+
+