From dad98a47f6c32158cf6f93ce2a7560a19d2e9715 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Wed, 7 Jun 2023 18:59:47 -0300 Subject: [PATCH] formatting code --- .../components/codeAreaComponent/index.tsx | 14 +- .../components/dropdownComponent/index.tsx | 56 ++- .../src/components/floatComponent/index.tsx | 13 +- .../src/components/inputComponent/index.tsx | 27 +- .../components/inputFileComponent/index.tsx | 15 +- .../src/components/intComponent/index.tsx | 11 +- .../src/components/promptComponent/index.tsx | 18 +- .../components/toggleShadComponent/index.tsx | 9 +- src/frontend/src/components/ui/button.tsx | 23 +- src/frontend/src/components/ui/checkbox.tsx | 17 +- src/frontend/src/components/ui/dialog.tsx | 45 +- src/frontend/src/components/ui/input.tsx | 13 +- src/frontend/src/components/ui/label.tsx | 19 +- src/frontend/src/components/ui/switch.tsx | 15 +- src/frontend/src/components/ui/textarea.tsx | 13 +- src/frontend/src/modals/ApiModal/index.tsx | 129 +++-- .../src/modals/EditNodeModal/index.tsx | 474 +++++++++--------- .../src/modals/codeAreaModal/index.tsx | 165 +++--- src/frontend/src/modals/exportModal/index.tsx | 162 +++--- .../src/modals/genericModal/index.tsx | 159 +++--- .../components/nodeToolbarComponent/index.tsx | 63 ++- src/frontend/src/utils.ts | 9 +- 22 files changed, 716 insertions(+), 753 deletions(-) diff --git a/src/frontend/src/components/codeAreaComponent/index.tsx b/src/frontend/src/components/codeAreaComponent/index.tsx index b9a32eca6..7ba38918b 100644 --- a/src/frontend/src/components/codeAreaComponent/index.tsx +++ b/src/frontend/src/components/codeAreaComponent/index.tsx @@ -39,9 +39,10 @@ export default function CodeAreaComponent({ ); }} className={ - editNode ? "h-7 truncate placeholder:text-center text-gray-500 border-0 block w-full pt-0.5 pb-0.5 form-input dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 rounded-md border-gray-300 shadow-sm sm:text-sm focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200" : - "truncate block w-full text-gray-500 px-3 py-2 rounded-md border border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm" + - (disabled ? " bg-gray-200" : "") + editNode + ? "h-7 truncate placeholder:text-center text-gray-500 border-0 block w-full pt-0.5 pb-0.5 form-input dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 rounded-md border-gray-300 shadow-sm sm:text-sm focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200" + : "truncate block w-full text-gray-500 px-3 py-2 rounded-md border border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm" + + (disabled ? " bg-gray-200" : "") } > {myValue !== "" ? myValue : "Text empty"} @@ -59,10 +60,9 @@ export default function CodeAreaComponent({ ); }} > - { - !editNode && - - } + {!editNode && ( + + )} diff --git a/src/frontend/src/components/dropdownComponent/index.tsx b/src/frontend/src/components/dropdownComponent/index.tsx index 423198045..48c41d118 100644 --- a/src/frontend/src/components/dropdownComponent/index.tsx +++ b/src/frontend/src/components/dropdownComponent/index.tsx @@ -8,12 +8,12 @@ export default function Dropdown({ value, options, onSelect, - editNode = false + editNode = false, }: DropDownComponentType) { let [internalValue, setInternalValue] = useState( value === "" || !value ? "Choose an option" : value ); - + return ( <> {({ open }) => ( <> -
- + {internalValue} - +
); } diff --git a/src/frontend/src/components/inputFileComponent/index.tsx b/src/frontend/src/components/inputFileComponent/index.tsx index 8d01145d6..4dd32b1da 100644 --- a/src/frontend/src/components/inputFileComponent/index.tsx +++ b/src/frontend/src/components/inputFileComponent/index.tsx @@ -10,7 +10,7 @@ export default function InputFileComponent({ suffixes, fileTypes, onFileChange, - editNode = false + editNode = false, }: FileComponentType) { const [myValue, setMyValue] = useState(value); const { setErrorData } = useContext(alertContext); @@ -72,17 +72,18 @@ export default function InputFileComponent({ {myValue !== "" ? myValue : "No file"} diff --git a/src/frontend/src/components/intComponent/index.tsx b/src/frontend/src/components/intComponent/index.tsx index 8794cae53..fa8dc8cbc 100644 --- a/src/frontend/src/components/intComponent/index.tsx +++ b/src/frontend/src/components/intComponent/index.tsx @@ -8,11 +8,11 @@ export default function IntComponent({ onChange, disableCopyPaste = false, disabled, - editNode = false + editNode = false, }: FloatComponentType) { const [myValue, setMyValue] = useState(value ?? ""); const { setDisableCopyPaste } = useContext(TabsContext); - + useEffect(() => { if (disabled) { setMyValue(""); @@ -55,9 +55,10 @@ export default function IntComponent({ type="number" value={myValue} className={ - editNode ? "arrow-hide placeholder:text-center border-0 block w-full pt-0.5 pb-0.5 form-input dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 rounded-md border-gray-300 shadow-sm sm:text-sm focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200" : - "block w-full form-input dark:bg-gray-900 arrow-hide dark:border-gray-600 dark:text-gray-300 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm" + - (disabled ? " bg-gray-200 dark:bg-gray-700" : "") + editNode + ? "arrow-hide placeholder:text-center border-0 block w-full pt-0.5 pb-0.5 form-input dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 rounded-md border-gray-300 shadow-sm sm:text-sm focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200" + : "block w-full form-input dark:bg-gray-900 arrow-hide dark:border-gray-600 dark:text-gray-300 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm" + + (disabled ? " bg-gray-200 dark:bg-gray-700" : "") } placeholder={editNode ? "Integer number" : "Type a integer number"} onChange={(e) => { diff --git a/src/frontend/src/components/promptComponent/index.tsx b/src/frontend/src/components/promptComponent/index.tsx index e7f88d1ba..a1729ef99 100644 --- a/src/frontend/src/components/promptComponent/index.tsx +++ b/src/frontend/src/components/promptComponent/index.tsx @@ -11,7 +11,7 @@ export default function PromptAreaComponent({ value, onChange, disabled, - editNode = false + editNode = false, }: TextAreaComponentType) { const [myValue, setMyValue] = useState(value); const { openPopUp } = useContext(PopUpContext); @@ -22,9 +22,6 @@ export default function PromptAreaComponent({ } }, [disabled, onChange]); return ( - - -
{myValue !== "" ? myValue : "-"} @@ -70,11 +68,9 @@ export default function PromptAreaComponent({ ); }} > - { - !editNode && + {!editNode && ( - } - + )}
diff --git a/src/frontend/src/components/toggleShadComponent/index.tsx b/src/frontend/src/components/toggleShadComponent/index.tsx index 0278c8cf5..188ddccf9 100644 --- a/src/frontend/src/components/toggleShadComponent/index.tsx +++ b/src/frontend/src/components/toggleShadComponent/index.tsx @@ -16,15 +16,14 @@ export default function ToggleShadComponent({ return (
{ setEnabled(x); }} - > - + >
); } diff --git a/src/frontend/src/components/ui/button.tsx b/src/frontend/src/components/ui/button.tsx index 40e315375..dfafeacd5 100644 --- a/src/frontend/src/components/ui/button.tsx +++ b/src/frontend/src/components/ui/button.tsx @@ -1,8 +1,7 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { cva, type VariantProps } from "class-variance-authority" -import { cn } from "../../utils" - +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot"; +import { cva, type VariantProps } from "class-variance-authority"; +import { cn } from "../../utils"; const buttonVariants = cva( "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background", @@ -30,26 +29,26 @@ const buttonVariants = cva( size: "default", }, } -) +); export interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps { - asChild?: boolean + asChild?: boolean; } const Button = React.forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button" + const Comp = asChild ? Slot : "button"; return ( - ) + ); } -) -Button.displayName = "Button" +); +Button.displayName = "Button"; -export { Button, buttonVariants } +export { Button, buttonVariants }; diff --git a/src/frontend/src/components/ui/checkbox.tsx b/src/frontend/src/components/ui/checkbox.tsx index c8b0eb960..4e4905bb9 100644 --- a/src/frontend/src/components/ui/checkbox.tsx +++ b/src/frontend/src/components/ui/checkbox.tsx @@ -1,10 +1,9 @@ -"use client" - -import * as React from "react" -import * as CheckboxPrimitive from "@radix-ui/react-checkbox" -import { Check } from "lucide-react" -import { cn } from "../../utils" +"use client"; +import * as React from "react"; +import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; +import { Check } from "lucide-react"; +import { cn } from "../../utils"; const Checkbox = React.forwardRef< React.ElementRef, @@ -24,7 +23,7 @@ const Checkbox = React.forwardRef< -)) -Checkbox.displayName = CheckboxPrimitive.Root.displayName +)); +Checkbox.displayName = CheckboxPrimitive.Root.displayName; -export { Checkbox } +export { Checkbox }; diff --git a/src/frontend/src/components/ui/dialog.tsx b/src/frontend/src/components/ui/dialog.tsx index fc4e2e506..30b2c6856 100644 --- a/src/frontend/src/components/ui/dialog.tsx +++ b/src/frontend/src/components/ui/dialog.tsx @@ -1,14 +1,13 @@ -"use client" +"use client"; -import * as React from "react" -import * as DialogPrimitive from "@radix-ui/react-dialog" -import { X } from "lucide-react" -import { cn } from "../../utils" +import * as React from "react"; +import * as DialogPrimitive from "@radix-ui/react-dialog"; +import { X } from "lucide-react"; +import { cn } from "../../utils"; +const Dialog = DialogPrimitive.Root; -const Dialog = DialogPrimitive.Root - -const DialogTrigger = DialogPrimitive.Trigger +const DialogTrigger = DialogPrimitive.Trigger; const DialogPortal = ({ className, @@ -20,8 +19,8 @@ const DialogPortal = ({ {children} -) -DialogPortal.displayName = DialogPrimitive.Portal.displayName +); +DialogPortal.displayName = DialogPrimitive.Portal.displayName; const DialogOverlay = React.forwardRef< React.ElementRef, @@ -35,8 +34,8 @@ const DialogOverlay = React.forwardRef< )} {...props} /> -)) -DialogOverlay.displayName = DialogPrimitive.Overlay.displayName +)); +DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; const DialogContent = React.forwardRef< React.ElementRef, @@ -59,8 +58,8 @@ const DialogContent = React.forwardRef< -)) -DialogContent.displayName = DialogPrimitive.Content.displayName +)); +DialogContent.displayName = DialogPrimitive.Content.displayName; const DialogHeader = ({ className, @@ -73,8 +72,8 @@ const DialogHeader = ({ )} {...props} /> -) -DialogHeader.displayName = "DialogHeader" +); +DialogHeader.displayName = "DialogHeader"; const DialogFooter = ({ className, @@ -87,8 +86,8 @@ const DialogFooter = ({ )} {...props} /> -) -DialogFooter.displayName = "DialogFooter" +); +DialogFooter.displayName = "DialogFooter"; const DialogTitle = React.forwardRef< React.ElementRef, @@ -102,8 +101,8 @@ const DialogTitle = React.forwardRef< )} {...props} /> -)) -DialogTitle.displayName = DialogPrimitive.Title.displayName +)); +DialogTitle.displayName = DialogPrimitive.Title.displayName; const DialogDescription = React.forwardRef< React.ElementRef, @@ -114,8 +113,8 @@ const DialogDescription = React.forwardRef< className={cn("text-sm text-muted-foreground", className)} {...props} /> -)) -DialogDescription.displayName = DialogPrimitive.Description.displayName +)); +DialogDescription.displayName = DialogPrimitive.Description.displayName; export { Dialog, @@ -125,4 +124,4 @@ export { DialogFooter, DialogTitle, DialogDescription, -} +}; diff --git a/src/frontend/src/components/ui/input.tsx b/src/frontend/src/components/ui/input.tsx index 20c529a79..f3a8757e8 100644 --- a/src/frontend/src/components/ui/input.tsx +++ b/src/frontend/src/components/ui/input.tsx @@ -1,6 +1,5 @@ -import * as React from "react" -import { cn } from "../../utils" - +import * as React from "react"; +import { cn } from "../../utils"; export interface InputProps extends React.InputHTMLAttributes {} @@ -17,9 +16,9 @@ const Input = React.forwardRef( ref={ref} {...props} /> - ) + ); } -) -Input.displayName = "Input" +); +Input.displayName = "Input"; -export { Input } +export { Input }; diff --git a/src/frontend/src/components/ui/label.tsx b/src/frontend/src/components/ui/label.tsx index d6578bf64..ab5129253 100644 --- a/src/frontend/src/components/ui/label.tsx +++ b/src/frontend/src/components/ui/label.tsx @@ -1,14 +1,13 @@ -"use client" - -import * as React from "react" -import * as LabelPrimitive from "@radix-ui/react-label" -import { cva, type VariantProps } from "class-variance-authority" -import { cn } from "../../utils" +"use client"; +import * as React from "react"; +import * as LabelPrimitive from "@radix-ui/react-label"; +import { cva, type VariantProps } from "class-variance-authority"; +import { cn } from "../../utils"; const labelVariants = cva( "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" -) +); const Label = React.forwardRef< React.ElementRef, @@ -20,7 +19,7 @@ const Label = React.forwardRef< className={cn(labelVariants(), className)} {...props} /> -)) -Label.displayName = LabelPrimitive.Root.displayName +)); +Label.displayName = LabelPrimitive.Root.displayName; -export { Label } +export { Label }; diff --git a/src/frontend/src/components/ui/switch.tsx b/src/frontend/src/components/ui/switch.tsx index 9c28fa50a..122057cfb 100644 --- a/src/frontend/src/components/ui/switch.tsx +++ b/src/frontend/src/components/ui/switch.tsx @@ -1,9 +1,8 @@ -"use client" - -import * as React from "react" -import * as SwitchPrimitives from "@radix-ui/react-switch" -import { cn } from "../../utils" +"use client"; +import * as React from "react"; +import * as SwitchPrimitives from "@radix-ui/react-switch"; +import { cn } from "../../utils"; const Switch = React.forwardRef< React.ElementRef, @@ -23,7 +22,7 @@ const Switch = React.forwardRef< )} /> -)) -Switch.displayName = SwitchPrimitives.Root.displayName +)); +Switch.displayName = SwitchPrimitives.Root.displayName; -export { Switch } +export { Switch }; diff --git a/src/frontend/src/components/ui/textarea.tsx b/src/frontend/src/components/ui/textarea.tsx index f008db2bc..fc0cda2ff 100644 --- a/src/frontend/src/components/ui/textarea.tsx +++ b/src/frontend/src/components/ui/textarea.tsx @@ -1,6 +1,5 @@ -import * as React from "react" -import { cn } from "../../utils" - +import * as React from "react"; +import { cn } from "../../utils"; export interface TextareaProps extends React.TextareaHTMLAttributes {} @@ -16,9 +15,9 @@ const Textarea = React.forwardRef( ref={ref} {...props} /> - ) + ); } -) -Textarea.displayName = "Textarea" +); +Textarea.displayName = "Textarea"; -export { Textarea } +export { Textarea }; diff --git a/src/frontend/src/modals/ApiModal/index.tsx b/src/frontend/src/modals/ApiModal/index.tsx index 47f0c854d..73535e119 100644 --- a/src/frontend/src/modals/ApiModal/index.tsx +++ b/src/frontend/src/modals/ApiModal/index.tsx @@ -48,7 +48,7 @@ export default function ApiModal({ flowName }) { function setModalOpen(x: boolean) { setOpen(x); if (x === false) { - closePopUp(); + closePopUp(); } } @@ -88,78 +88,69 @@ flow("Hey, have you heard of LangFlow?")`; }, ]; return ( - - - - - - - - - Code - + + + + + Code - - Export your flow to use it with this code. - - - - - -
-
- {tabs.map((tab, index) => ( - - ))} -
-
-
-
- -
- -
- - {tabs[activeTab].code} - -
-
-
-
+ + Export your flow to use it with this code. + + +
+
+ {tabs.map((tab, index) => ( + + ))} +
+
+
+
+ +
+
+ + {tabs[activeTab].code} + +
+
+ + ); } diff --git a/src/frontend/src/modals/EditNodeModal/index.tsx b/src/frontend/src/modals/EditNodeModal/index.tsx index 38dbd7baf..c68afe408 100644 --- a/src/frontend/src/modals/EditNodeModal/index.tsx +++ b/src/frontend/src/modals/EditNodeModal/index.tsx @@ -43,7 +43,6 @@ import { } from "../../components/ui/dialog"; import { Button } from "../../components/ui/button"; - export default function EditNodeModal({ data }: { data: NodeDataType }) { const [open, setOpen] = useState(true); const [nodeLength, setNodeLength] = useState( @@ -66,263 +65,272 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) { const { types } = useContext(typesContext); const ref = useRef(); const { save } = useContext(TabsContext); - const [enabled, setEnabled] = useState( - false - ); - if(nodeLength == 0){ + const [enabled, setEnabled] = useState(false); + if (nodeLength == 0) { closePopUp(); } function setModalOpen(x: boolean) { setOpen(x); if (x === false) { - closePopUp(); + closePopUp(); } } - function changeAdvanced(node): void{ + function changeAdvanced(node): void { Object.keys(data.node.template).filter((n, i) => { if (n === node.name) { data.node.template[n].advanced = !data.node.template[n].advanced; } return true; }); - setNodeValue(!nodeValue) + setNodeValue(!nodeValue); } console.log(data.node.template); - return ( - - - - - - - Edit Node - - + + + + + Edit Node - - Make configurations changes to your nodes. Click save when you're done. -
-   - Parameters + + Make configurations changes to your nodes. Click save when you're + done. +
+ +   + + + Parameters + +
+
+ + +
+
limitScrollFieldsModal + ? "overflow-scroll overflow-x-hidden custom-scroll" + : "overflow-hidden" + )} + > + {nodeLength > 0 && ( +
+ + + + PARAM + + VALUE + + SHOW + + + + {Object.keys(data.node.template) + .filter( + (t) => + t.charAt(0) !== "_" && + data.node.template[t].show && + (data.node.template[t].type === "str" || + data.node.template[t].type === "bool" || + data.node.template[t].type === "float" || + data.node.template[t].type === "code" || + data.node.template[t].type === "prompt" || + data.node.template[t].type === "file" || + data.node.template[t].type === "Any" || + data.node.template[t].type === "int") + ) + .map((n, i) => ( + + + {data.node.template[n].name + ? data.node.template[n].name + : data.node.template[n].display_name} + + + {data.node.template[n].type === "str" && + !data.node.template[n].options ? ( +
+ {data.node.template[n].list ? ( + { + data.node.template[n].value = t; + save(); + }} + /> + ) : data.node.template[n].multiline ? ( + { + data.node.template[n].value = t; + save(); + }} + /> + ) : ( + { + data.node.template[n].value = t; + save(); + }} + /> + )} +
+ ) : data.node.template[n].type === "bool" ? ( +
+ {" "} + { + data.node.template[n].value = e; + setEnabled(e); + save(); + }} + disabled={false} + /> +
+ ) : data.node.template[n].type === "float" ? ( +
+ { + data.node.template[n].value = t; + save(); + }} + /> +
+ ) : data.node.template[n].type === "str" && + data.node.template[n].options ? ( +
+ + (data.node.template[n].value = newValue) + } + value={ + data.node.template[n].value ?? + "Choose an option" + } + > +
+ ) : data.node.template[n].type === "int" ? ( +
+ { + data.node.template[n].value = t; + save(); + }} + /> +
+ ) : data.node.template[n].type === "file" ? ( +
+ { + data.node.template[n].value = t; + }} + fileTypes={data.node.template[n].fileTypes} + suffixes={data.node.template[n].suffixes} + onFileChange={(t: string) => { + data.node.template[n].content = t; + save(); + }} + > +
+ ) : data.node.template[n].type === "prompt" ? ( +
+ { + data.node.template[n].value = t; + save(); + }} + /> +
+ ) : data.node.template[n].type === "code" ? ( +
+ { + data.node.template[n].value = t; + save(); + }} + /> +
+ ) : data.node.template[n].type === "Any" ? ( + "-" + ) : ( +
+ )} +
+ +
+ + changeAdvanced(data.node.template[n]) + } + disabled={false} + /> +
+
+
+ ))} +
+
+
+ )}
+
- - - -
- -
limitScrollFieldsModal - ? "overflow-scroll overflow-x-hidden custom-scroll" - : "overflow-hidden" - )} -> - { - nodeLength > 0 && -
- - - - - PARAM - - VALUE - SHOW - - - - { Object.keys(data.node.template).filter( - (t) => - t.charAt(0) !== "_" && - data.node.template[t].show && - (data.node.template[t].type === "str" || - data.node.template[t].type === "bool" || - data.node.template[t].type === "float" || - data.node.template[t].type === "code" || - data.node.template[t].type === "prompt" || - data.node.template[t].type === "file" || - data.node.template[t].type === "Any" || - data.node.template[t].type === "int") - ) - .map((n, i) => ( - - - {data.node.template[n].name - ? data.node.template[n].name - : data.node.template[n].display_name} - - - -{data.node.template[n].type === "str" && !data.node.template[n].options ? ( -
-{data.node.template[n].list ? ( - { -data.node.template[n].value = t; -save(); -}} -/> -) : data.node.template[n].multiline ? ( - { -data.node.template[n].value = t; -save(); -}} -/> -) : ( - { -data.node.template[n].value = t; -save(); -}} -/> -)} -
-) : data.node.template[n].type === "bool" ? ( -
-{" "} - { -data.node.template[n].value = e; -setEnabled(e); -save(); -}} -disabled={false} /> -
-) : data.node.template[n].type === "float" ? ( -
- { -data.node.template[n].value = t; -save(); -}} -/> -
-) : data.node.template[n].type === "str" && data.node.template[n].options ? ( -
- (data.node.template[n].value = newValue)} -value={data.node.template[n].value ?? "Choose an option"} -> -
-) : data.node.template[n].type === "int" ? ( -
- { -data.node.template[n].value = t; -save(); -}} -/> -
-) : data.node.template[n].type === "file" ? ( -
- { -data.node.template[n].value = t; -}} -fileTypes={data.node.template[n].fileTypes} -suffixes={data.node.template[n].suffixes} -onFileChange={(t: string) => { -data.node.template[n].content = t; -save(); -}} -> -
-) : data.node.template[n].type === "prompt" ? ( -
- { -data.node.template[n].value = t; -save(); -}} -/> -
-) : data.node.template[n].type === "code" ? ( -
- { -data.node.template[n].value = t; -save(); -}} -/> -
-) -: data.node.template[n].type === "Any" ? "-" : ( -
-) } - - -
- - -
- changeAdvanced(data.node.template[n])} - disabled={false} /> -
-
-
- ))} -
-
-
} -
-
- - - - - -
+ + + + + ); } diff --git a/src/frontend/src/modals/codeAreaModal/index.tsx b/src/frontend/src/modals/codeAreaModal/index.tsx index c5d9573cb..644e7fd00 100644 --- a/src/frontend/src/modals/codeAreaModal/index.tsx +++ b/src/frontend/src/modals/codeAreaModal/index.tsx @@ -44,100 +44,89 @@ export default function CodeAreaModal({ } } return ( - - - - - - - - Edit Code - + + + + + Edit Code - - Make configurations changes to your nodes. Click save when you're done. + + Make configurations changes to your nodes. Click save when you're + done. + + - - +
+ { + setCode(value); + }} + className="w-full rounded-lg h-[300px] custom-scroll" + /> +
- -
- { - setCode(value); - }} - className="w-full rounded-lg h-[300px] custom-scroll" - /> - -
- - - - - - -
-
- + title: + "There is something wrong with this code, please review it", + }) + ); + }} + type="submit" + > + Check & Save + + + + ); } diff --git a/src/frontend/src/modals/exportModal/index.tsx b/src/frontend/src/modals/exportModal/index.tsx index 7628fb327..968944158 100644 --- a/src/frontend/src/modals/exportModal/index.tsx +++ b/src/frontend/src/modals/exportModal/index.tsx @@ -41,98 +41,88 @@ export default function ExportModal() { const [checked, setChecked] = useState(true); const [name, setName] = useState(flows[tabIndex].name); return ( - - - - - - - - - - Export - + + + + + + Export - - Make configurations changes to your nodes. Click save when you're done. + + Make configurations changes to your nodes. Click save when you're + done. + + - - - -