fix: update minimized component outdated design (#4896)
* Fix nodeStatus to show only when showNode is true * Removed unused classes and made update not appear wrong on minimized components
This commit is contained in:
parent
2eec720a0c
commit
42f8c4b20f
2 changed files with 20 additions and 21 deletions
|
|
@ -190,7 +190,7 @@ export default function NodeStatus({
|
||||||
return "Run component";
|
return "Run component";
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return showNode ? (
|
||||||
<>
|
<>
|
||||||
<div className="flex flex-shrink-0 items-center">
|
<div className="flex flex-shrink-0 items-center">
|
||||||
<div className="flex items-center gap-2 self-center">
|
<div className="flex items-center gap-2 self-center">
|
||||||
|
|
@ -284,5 +284,7 @@ export default function NodeStatus({
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -341,10 +341,8 @@ export default function GenericNode({
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
borderColor,
|
borderColor,
|
||||||
showNode
|
showNode ? "w-80" : `w-48`,
|
||||||
? "w-80 rounded-xl shadow-sm hover:shadow-md"
|
"generic-node-div group/node relative rounded-xl shadow-sm hover:shadow-md",
|
||||||
: `h-[4.065rem] w-48 rounded-[0.75rem] ${!selected ? "border-[1px] border-border ring-[0.5px] ring-border" : ""}`,
|
|
||||||
"generic-node-div group/node relative",
|
|
||||||
!hasOutputs && "pb-4",
|
!hasOutputs && "pb-4",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|
@ -357,8 +355,9 @@ export default function GenericNode({
|
||||||
className="h-[18px] w-[18px] shrink-0"
|
className="h-[18px] w-[18px] shrink-0"
|
||||||
/>
|
/>
|
||||||
<span className="flex-1 truncate text-sm font-medium">
|
<span className="flex-1 truncate text-sm font-medium">
|
||||||
Update Ready
|
{showNode && "Update Ready"}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant="warning"
|
variant="warning"
|
||||||
size="iconMd"
|
size="iconMd"
|
||||||
|
|
@ -424,7 +423,6 @@ export default function GenericNode({
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{showNode && (
|
|
||||||
<NodeStatus
|
<NodeStatus
|
||||||
data={data}
|
data={data}
|
||||||
frozen={data.node?.frozen}
|
frozen={data.node?.frozen}
|
||||||
|
|
@ -438,7 +436,6 @@ export default function GenericNode({
|
||||||
isUserEdited={isUserEdited}
|
isUserEdited={isUserEdited}
|
||||||
getValidationStatus={getValidationStatus}
|
getValidationStatus={getValidationStatus}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
{showNode && (
|
{showNode && (
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue