code format
This commit is contained in:
parent
76def20d86
commit
eaab405742
5 changed files with 31 additions and 20 deletions
|
|
@ -1,4 +1,3 @@
|
|||
from math import log
|
||||
from typing import Optional
|
||||
from loguru import logger
|
||||
from pathlib import Path
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ const EditNodeModal = forwardRef(
|
|||
</div>
|
||||
) : myData.current.node?.template[templateParam]
|
||||
.type === "dict" ? (
|
||||
<div className="mt-2 w-full max-h-48 overflow-auto custom-scroll">
|
||||
<div className="mt-2 max-h-48 w-full overflow-auto custom-scroll">
|
||||
<KeypairListComponent
|
||||
disabled={disabled}
|
||||
editNode={true}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ export default function NodeToolbarComponent({
|
|||
setShowNode((prev) => !prev);
|
||||
updateNodeInternals(data.id);
|
||||
}
|
||||
if(event.includes("disabled")){
|
||||
if (event.includes("disabled")) {
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
|
@ -156,8 +156,20 @@ export default function NodeToolbarComponent({
|
|||
</SelectTrigger>
|
||||
</ShadTooltip>
|
||||
<SelectContent>
|
||||
<SelectItem value={getRandomKeyByssmm() + (nodeLength==0?"disabled":"advanced")}>
|
||||
<div className={"flex "+(nodeLength==0?"text-muted-foreground":"text-primary")}>
|
||||
<SelectItem
|
||||
value={
|
||||
getRandomKeyByssmm() +
|
||||
(nodeLength == 0 ? "disabled" : "advanced")
|
||||
}
|
||||
>
|
||||
<div
|
||||
className={
|
||||
"flex " +
|
||||
(nodeLength == 0
|
||||
? "text-muted-foreground"
|
||||
: "text-primary")
|
||||
}
|
||||
>
|
||||
<IconComponent
|
||||
name="Settings2"
|
||||
className="relative top-0.5 mr-2 h-4 w-4"
|
||||
|
|
@ -182,7 +194,7 @@ export default function NodeToolbarComponent({
|
|||
<ShadTooltip content="Edit" side="top">
|
||||
<div>
|
||||
<button
|
||||
disabled={nodeLength === 0}
|
||||
disabled={nodeLength === 0}
|
||||
onClick={() => setShowModalAdvanced(true)}
|
||||
className={classNames(
|
||||
"relative -ml-px inline-flex items-center rounded-r-md 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" +
|
||||
|
|
|
|||
|
|
@ -41,13 +41,13 @@ export default function HomePage(): JSX.Element {
|
|||
|
||||
const dragOver = (e) => {
|
||||
e.preventDefault();
|
||||
if(e.dataTransfer.types.some((types) => types === "Files")){
|
||||
if (e.dataTransfer.types.some((types) => types === "Files")) {
|
||||
setIsDragging(true);
|
||||
}
|
||||
};
|
||||
|
||||
const dragEnter = (e) => {
|
||||
if(e.dataTransfer.types.some((types) => types === "Files")){
|
||||
if (e.dataTransfer.types.some((types) => types === "Files")) {
|
||||
setIsDragging(true);
|
||||
}
|
||||
e.preventDefault();
|
||||
|
|
|
|||
|
|
@ -134,18 +134,18 @@ export type TooltipComponentType = {
|
|||
children: ReactElement;
|
||||
title: string | ReactElement;
|
||||
placement?:
|
||||
| "bottom-end"
|
||||
| "bottom-start"
|
||||
| "bottom"
|
||||
| "left-end"
|
||||
| "left-start"
|
||||
| "left"
|
||||
| "right-end"
|
||||
| "right-start"
|
||||
| "right"
|
||||
| "top-end"
|
||||
| "top-start"
|
||||
| "top";
|
||||
| "bottom-end"
|
||||
| "bottom-start"
|
||||
| "bottom"
|
||||
| "left-end"
|
||||
| "left-start"
|
||||
| "left"
|
||||
| "right-end"
|
||||
| "right-start"
|
||||
| "right"
|
||||
| "top-end"
|
||||
| "top-start"
|
||||
| "top";
|
||||
};
|
||||
|
||||
export type ProgressBarType = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue