Fix ParentDisclosureComponent and commented frozen option
This commit is contained in:
parent
e0b85f0872
commit
7a439e8966
2 changed files with 23 additions and 7 deletions
|
|
@ -26,7 +26,7 @@ export default function ParentDisclosureComponent({
|
||||||
<IconComponent
|
<IconComponent
|
||||||
name="ChevronsUpDownIcon"
|
name="ChevronsUpDownIcon"
|
||||||
className={`${
|
className={`${
|
||||||
open || openDisc ? "rotate-90 transform" : ""
|
open || openDisc ? "" : ""
|
||||||
} h-4 w-4 text-foreground`}
|
} h-4 w-4 text-foreground`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ export default function NodeToolbarComponent({
|
||||||
const isMinimal = numberOfHandles <= 1;
|
const isMinimal = numberOfHandles <= 1;
|
||||||
const isGroup = data.node?.flow ? true : false;
|
const isGroup = data.node?.flow ? true : false;
|
||||||
|
|
||||||
const frozen = data.node?.frozen ?? false;
|
// const frozen = data.node?.frozen ?? false;
|
||||||
const paste = useFlowStore((state) => state.paste);
|
const paste = useFlowStore((state) => state.paste);
|
||||||
const nodes = useFlowStore((state) => state.nodes);
|
const nodes = useFlowStore((state) => state.nodes);
|
||||||
const edges = useFlowStore((state) => state.edges);
|
const edges = useFlowStore((state) => state.edges);
|
||||||
|
|
@ -407,7 +407,23 @@ export default function NodeToolbarComponent({
|
||||||
</button>
|
</button>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
|
|
||||||
<ShadTooltip content="Freeze" side="top">
|
<ShadTooltip content={"Duplicate"} side="top">
|
||||||
|
<button
|
||||||
|
data-testid="save-button-modal"
|
||||||
|
className={classNames(
|
||||||
|
"relative -ml-px inline-flex items-center bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10",
|
||||||
|
)}
|
||||||
|
onClick={(event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
handleSelectChange("duplicate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<IconComponent name="Copy" className="h-4 w-4" />
|
||||||
|
</button>
|
||||||
|
</ShadTooltip>
|
||||||
|
|
||||||
|
{/* <ShadTooltip content="Freeze" side="top">
|
||||||
<button
|
<button
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"relative -ml-px inline-flex items-center bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10"
|
"relative -ml-px inline-flex items-center bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10"
|
||||||
|
|
@ -420,7 +436,7 @@ export default function NodeToolbarComponent({
|
||||||
...old.data,
|
...old.data,
|
||||||
node: {
|
node: {
|
||||||
...old.data.node,
|
...old.data.node,
|
||||||
frozen: old.data?.node?.frozen ? false : true,
|
// frozen: old.data?.node?.frozen ? false : true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
@ -435,7 +451,7 @@ export default function NodeToolbarComponent({
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</ShadTooltip>
|
</ShadTooltip> */}
|
||||||
|
|
||||||
<Select onValueChange={handleSelectChange} value="">
|
<Select onValueChange={handleSelectChange} value="">
|
||||||
<ShadTooltip content="More" side="top">
|
<ShadTooltip content="More" side="top">
|
||||||
|
|
@ -468,7 +484,7 @@ export default function NodeToolbarComponent({
|
||||||
/>
|
/>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
)}
|
)}
|
||||||
<SelectItem value={"duplicate"}>
|
{/* <SelectItem value={"duplicate"}>
|
||||||
<ToolbarSelectItem
|
<ToolbarSelectItem
|
||||||
keyboardKey="D"
|
keyboardKey="D"
|
||||||
isMac={navigator.userAgent.toUpperCase().includes("MAC")}
|
isMac={navigator.userAgent.toUpperCase().includes("MAC")}
|
||||||
|
|
@ -477,7 +493,7 @@ export default function NodeToolbarComponent({
|
||||||
icon={"Copy"}
|
icon={"Copy"}
|
||||||
dataTestId="duplicate-button-modal"
|
dataTestId="duplicate-button-modal"
|
||||||
/>
|
/>
|
||||||
</SelectItem>
|
</SelectItem> */}
|
||||||
<SelectItem value={"copy"}>
|
<SelectItem value={"copy"}>
|
||||||
<ToolbarSelectItem
|
<ToolbarSelectItem
|
||||||
keyboardKey="C"
|
keyboardKey="C"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue