@@ -97,6 +100,7 @@ export default function Dashboard({
-
setIsShareOpen(true)}>
-
- Share
-
+ {isOwner ? (
+
setIsShareOpen(true)}>
+
+ Share
+
+ ) : null}
diff --git a/frontend/components/editor/sidebar/folder.tsx b/frontend/components/editor/sidebar/folder.tsx
index 1bb9c1c..0e447ea 100644
--- a/frontend/components/editor/sidebar/folder.tsx
+++ b/frontend/components/editor/sidebar/folder.tsx
@@ -5,6 +5,13 @@ import { useEffect, useRef, useState } from "react"
import { getIconForFolder, getIconForOpenFolder } from "vscode-icons-js"
import { TFile, TFolder, TTab } from "./types"
import SidebarFile from "./file"
+import {
+ ContextMenu,
+ ContextMenuContent,
+ ContextMenuItem,
+ ContextMenuTrigger,
+} from "@/components/ui/context-menu"
+import { Pencil, Trash2 } from "lucide-react"
export default function SidebarFolder({
data,
@@ -39,12 +46,9 @@ export default function SidebarFolder({
}, [editing])
return (
- <>
-
+ setIsOpen((prev) => !prev)}
- onDoubleClick={() => {
- setEditing(true)
- }}
className="w-full flex items-center h-7 px-1 transition-colors hover:bg-secondary rounded-sm cursor-pointer"
>
-
+
+
+ {
+ console.log("rename")
+ setEditing(true)
+ }}
+ >
+
+ Rename
+
+ {
+ console.log("delete")
+ // setPendingDelete(true)
+ // handleDeleteFile(data)
+ }}
+ >
+
+ Delete
+
+
{isOpen ? (
@@ -102,6 +128,6 @@ export default function SidebarFolder({
) : null}
- >
+
)
}