Allow user to share a flow publicly and make it duplicatable

Closes #360
This commit is contained in:
Baptiste Arnaud
2023-11-23 12:05:31 +01:00
parent 8a07392821
commit bb41226a04
130 changed files with 1150 additions and 2012 deletions

View File

@@ -151,7 +151,7 @@ export const BlockNode = ({
const handleClick = (e: React.MouseEvent) => {
setFocusedGroupId(groupId)
e.stopPropagation()
if (isTextBubbleBlock(block)) setIsEditing(true)
if (isTextBubbleBlock(block) && !isReadOnly) setIsEditing(true)
setOpenedBlockId(block.id)
}

View File

@@ -112,11 +112,7 @@ export const BlockNodesList = ({ blocks, groupIndex, groupRef }: Props) => {
})
return (
<Stack
spacing={1}
transition="none"
pointerEvents={isReadOnly ? 'none' : 'auto'}
>
<Stack spacing={1} transition="none">
<PlaceholderNode
isVisible={showSortPlaceholders}
isExpanded={expandedPlaceholderIndex === 0}

View File

@@ -227,7 +227,6 @@ const NonMemoizedDraggableGroupNode = ({
onChange={setGroupTitle}
onSubmit={handleTitleSubmit}
fontWeight="semibold"
pointerEvents={isReadOnly ? 'none' : 'auto'}
pr="8"
>
<EditablePreview