From 736cbb83db10b1960248e932b44f054cdafcbd1e Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Thu, 8 Jun 2023 13:27:50 -0300 Subject: [PATCH] Adding key-value to modal subtitles --- src/frontend/src/modals/EditNodeModal/index.tsx | 4 ++-- src/frontend/src/modals/codeAreaModal/index.tsx | 4 ++-- src/frontend/src/modals/exportModal/index.tsx | 4 ++-- src/frontend/src/modals/genericModal/index.tsx | 4 ++-- src/frontend/src/modals/modal-texts.tsx | 8 ++++++++ 5 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 src/frontend/src/modals/modal-texts.tsx diff --git a/src/frontend/src/modals/EditNodeModal/index.tsx b/src/frontend/src/modals/EditNodeModal/index.tsx index c68afe408..7729942dc 100644 --- a/src/frontend/src/modals/EditNodeModal/index.tsx +++ b/src/frontend/src/modals/EditNodeModal/index.tsx @@ -42,6 +42,7 @@ import { DialogTrigger, } from "../../components/ui/dialog"; import { Button } from "../../components/ui/button"; +import { modalSubtitle } from "../modal-texts"; export default function EditNodeModal({ data }: { data: NodeDataType }) { const [open, setOpen] = useState(true); @@ -102,8 +103,7 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) { /> - Make configurations changes to your nodes. Click save when you're - done. + {modalSubtitle['edit']}
  diff --git a/src/frontend/src/modals/codeAreaModal/index.tsx b/src/frontend/src/modals/codeAreaModal/index.tsx index 644e7fd00..b2f72928b 100644 --- a/src/frontend/src/modals/codeAreaModal/index.tsx +++ b/src/frontend/src/modals/codeAreaModal/index.tsx @@ -21,6 +21,7 @@ import { DialogTrigger, } from "../../components/ui/dialog"; import { Button } from "../../components/ui/button"; +import { modalSubtitle } from "../modal-texts"; export default function CodeAreaModal({ value, @@ -56,8 +57,7 @@ export default function CodeAreaModal({ /> - Make configurations changes to your nodes. Click save when you're - done. + {modalSubtitle['codeprompt']} diff --git a/src/frontend/src/modals/exportModal/index.tsx b/src/frontend/src/modals/exportModal/index.tsx index e6ab07d5e..d0d2fc373 100644 --- a/src/frontend/src/modals/exportModal/index.tsx +++ b/src/frontend/src/modals/exportModal/index.tsx @@ -23,6 +23,7 @@ import { Label } from "@radix-ui/react-label"; import { Checkbox } from "../../components/ui/checkbox"; import { Textarea } from "../../components/ui/textarea"; import { Input } from "../../components/ui/input"; +import { modalSubtitle } from "../modal-texts"; export default function ExportModal() { const [open, setOpen] = useState(true); @@ -53,8 +54,7 @@ export default function ExportModal() { /> - Make configurations changes to your nodes. Click save when you're - done. + {modalSubtitle['export']} diff --git a/src/frontend/src/modals/genericModal/index.tsx b/src/frontend/src/modals/genericModal/index.tsx index 672581aac..730ed4844 100644 --- a/src/frontend/src/modals/genericModal/index.tsx +++ b/src/frontend/src/modals/genericModal/index.tsx @@ -16,6 +16,7 @@ import { } from "../../components/ui/dialog"; import { Button } from "../../components/ui/button"; import { Textarea } from "../../components/ui/textarea"; +import { modalSubtitle } from "../modal-texts"; export default function PromptAreaModal({ value, @@ -59,8 +60,7 @@ export default function PromptAreaModal({ /> - Make configurations changes to your nodes. Click save when you're - done. + {modalSubtitle['prompt']} diff --git a/src/frontend/src/modals/modal-texts.tsx b/src/frontend/src/modals/modal-texts.tsx new file mode 100644 index 000000000..dea516e9d --- /dev/null +++ b/src/frontend/src/modals/modal-texts.tsx @@ -0,0 +1,8 @@ + +export const modalSubtitle = { + export: "Export your models.", + code: "Export your flow to use it with this code.", + edit: "Make configurations changes to your nodes. Click save when you're done.", + codeprompt: "Edit you python code.", + prompt: "Edit you prompt." + }; \ No newline at end of file