From 41dbd4a1dac493948a1b3e0e024158da8a55361b Mon Sep 17 00:00:00 2001 From: Akhileshrangani4 Date: Sat, 12 Oct 2024 14:54:21 -0400 Subject: [PATCH] feature: enable file renaming Users can now rename a file by double-clicking on it. --- frontend/components/editor/sidebar/file.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/components/editor/sidebar/file.tsx b/frontend/components/editor/sidebar/file.tsx index 14bc0da..b3f2e54 100644 --- a/frontend/components/editor/sidebar/file.tsx +++ b/frontend/components/editor/sidebar/file.tsx @@ -90,9 +90,9 @@ export default function SidebarFile({ if (!editing && !pendingDelete && !isMoving) selectFile({ ...data, saved: true }); }} - // onDoubleClick={() => { - // setEditing(true) - // }} + onDoubleClick={() => { + setEditing(true) + }} className={`${ dragging ? "opacity-50 hover:!bg-background" : "" } data-[state=open]:bg-secondary/50 w-full flex items-center h-7 px-1 hover:bg-secondary rounded-sm cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`}