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 typing import Optional
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ const EditNodeModal = forwardRef(
|
||||||
</div>
|
</div>
|
||||||
) : myData.current.node?.template[templateParam]
|
) : myData.current.node?.template[templateParam]
|
||||||
.type === "dict" ? (
|
.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
|
<KeypairListComponent
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
editNode={true}
|
editNode={true}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ export default function NodeToolbarComponent({
|
||||||
setShowNode((prev) => !prev);
|
setShowNode((prev) => !prev);
|
||||||
updateNodeInternals(data.id);
|
updateNodeInternals(data.id);
|
||||||
}
|
}
|
||||||
if(event.includes("disabled")){
|
if (event.includes("disabled")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -156,8 +156,20 @@ export default function NodeToolbarComponent({
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value={getRandomKeyByssmm() + (nodeLength==0?"disabled":"advanced")}>
|
<SelectItem
|
||||||
<div className={"flex "+(nodeLength==0?"text-muted-foreground":"text-primary")}>
|
value={
|
||||||
|
getRandomKeyByssmm() +
|
||||||
|
(nodeLength == 0 ? "disabled" : "advanced")
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={
|
||||||
|
"flex " +
|
||||||
|
(nodeLength == 0
|
||||||
|
? "text-muted-foreground"
|
||||||
|
: "text-primary")
|
||||||
|
}
|
||||||
|
>
|
||||||
<IconComponent
|
<IconComponent
|
||||||
name="Settings2"
|
name="Settings2"
|
||||||
className="relative top-0.5 mr-2 h-4 w-4"
|
className="relative top-0.5 mr-2 h-4 w-4"
|
||||||
|
|
@ -182,7 +194,7 @@ export default function NodeToolbarComponent({
|
||||||
<ShadTooltip content="Edit" side="top">
|
<ShadTooltip content="Edit" side="top">
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
disabled={nodeLength === 0}
|
disabled={nodeLength === 0}
|
||||||
onClick={() => setShowModalAdvanced(true)}
|
onClick={() => setShowModalAdvanced(true)}
|
||||||
className={classNames(
|
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" +
|
"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) => {
|
const dragOver = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if(e.dataTransfer.types.some((types) => types === "Files")){
|
if (e.dataTransfer.types.some((types) => types === "Files")) {
|
||||||
setIsDragging(true);
|
setIsDragging(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const dragEnter = (e) => {
|
const dragEnter = (e) => {
|
||||||
if(e.dataTransfer.types.some((types) => types === "Files")){
|
if (e.dataTransfer.types.some((types) => types === "Files")) {
|
||||||
setIsDragging(true);
|
setIsDragging(true);
|
||||||
}
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
||||||
|
|
@ -134,18 +134,18 @@ export type TooltipComponentType = {
|
||||||
children: ReactElement;
|
children: ReactElement;
|
||||||
title: string | ReactElement;
|
title: string | ReactElement;
|
||||||
placement?:
|
placement?:
|
||||||
| "bottom-end"
|
| "bottom-end"
|
||||||
| "bottom-start"
|
| "bottom-start"
|
||||||
| "bottom"
|
| "bottom"
|
||||||
| "left-end"
|
| "left-end"
|
||||||
| "left-start"
|
| "left-start"
|
||||||
| "left"
|
| "left"
|
||||||
| "right-end"
|
| "right-end"
|
||||||
| "right-start"
|
| "right-start"
|
||||||
| "right"
|
| "right"
|
||||||
| "top-end"
|
| "top-end"
|
||||||
| "top-start"
|
| "top-start"
|
||||||
| "top";
|
| "top";
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ProgressBarType = {
|
export type ProgressBarType = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue