From 9d5faaf3c269e931d1a172b82e91267b51476943 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Thu, 29 Feb 2024 20:33:12 +0100 Subject: [PATCH] Added name changing --- src/frontend/src/CustomNodes/GenericNode/index.tsx | 2 +- src/frontend/src/components/IOview/index.tsx | 4 ++-- src/frontend/src/constants/constants.ts | 2 +- src/frontend/src/utils/styleUtils.ts | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 9b81f93a2..421db75e8 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -128,7 +128,7 @@ export default function GenericNode({ const showNode = data.showNode ?? true; - const nameEditable = data.node?.flow || data.type === "CustomComponent"; + const nameEditable = true; const emojiRegex = /\p{Emoji}/u; const isEmoji = emojiRegex.test(data?.node?.icon!); diff --git a/src/frontend/src/components/IOview/index.tsx b/src/frontend/src/components/IOview/index.tsx index 8f914c716..73c87f7f4 100644 --- a/src/frontend/src/components/IOview/index.tsx +++ b/src/frontend/src/components/IOview/index.tsx @@ -153,7 +153,7 @@ export default function IOView({ children, open, setOpen }): JSX.Element { trigger={
- {input.id} + {node.data.node.display_name} {haveChat && (
- + {outputsModalTitle}
{nodes diff --git a/src/frontend/src/constants/constants.ts b/src/frontend/src/constants/constants.ts index d9ce68847..fcf3d71ef 100644 --- a/src/frontend/src/constants/constants.ts +++ b/src/frontend/src/constants/constants.ts @@ -701,7 +701,7 @@ export const editTextPlaceholder = "Type message here."; export const inputHandleHover = "Avaliable input components:"; export const outputHandleHover = "Avaliable output components:"; export const textInputModalTitle = "Text Inputs"; -export const outputsModalTitle = "Prompt Outputs"; +export const outputsModalTitle = "Text Outputs"; export const langflowChatTitle = "Langflow Chat"; export const chatInputPlaceholder = "No chat input variables found. Click to run your flow."; diff --git a/src/frontend/src/utils/styleUtils.ts b/src/frontend/src/utils/styleUtils.ts index aa1b818a5..a82269960 100644 --- a/src/frontend/src/utils/styleUtils.ts +++ b/src/frontend/src/utils/styleUtils.ts @@ -42,6 +42,7 @@ import { FileSearch, FileSearch2, FileText, + FileType2, FileUp, Fingerprint, FlaskConical, @@ -354,6 +355,7 @@ export const nodeIconsLucide: iconsType = { Plus, Redo, Settings2, + FileType2, Undo, FileSearch2, ChevronRight,