diff --git a/src/renderer/src/components/profiles/profile-item.tsx b/src/renderer/src/components/profiles/profile-item.tsx index 687abd2..cf84ee5 100644 --- a/src/renderer/src/components/profiles/profile-item.tsx +++ b/src/renderer/src/components/profiles/profile-item.tsx @@ -60,6 +60,7 @@ const ProfileItem: React.FC = (props) => { const [selecting, setSelecting] = useState(false) const [openInfoEditor, setOpenInfoEditor] = useState(false) const [openFileEditor, setOpenFileEditor] = useState(false) + const [dropdownOpen, setDropdownOpen] = useState(false) const { attributes, listeners, @@ -143,6 +144,12 @@ const ProfileItem: React.FC = (props) => { } } + const handleContextMenu = (e: React.MouseEvent) => { + e.preventDefault() + e.stopPropagation() + setDropdownOpen(true) + } + useEffect(() => { if (isDragging) { setTimeout(() => { @@ -155,6 +162,8 @@ const ProfileItem: React.FC = (props) => { } }, [isDragging]) + + return (
= (props) => { updateProfileItem={updateProfileItem} /> )} + = (props) => { setSelecting(false) }) }} + onContextMenu={handleContextMenu} className={`${isCurrent ? 'bg-primary' : ''} ${selecting ? 'blur-sm' : ''}`} >
@@ -218,7 +229,10 @@ const ProfileItem: React.FC = (props) => { )} - +