From be7d9c93fe18151b019affcef61a8d362fc195e7 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Fri, 7 Jul 2023 12:05:01 -0300 Subject: [PATCH] Formatting changes --- src/backend/langflow/lcserve.py | 4 +- src/frontend/src/App.tsx | 7 +-- .../src/CustomNodes/GenericNode/index.tsx | 4 +- src/frontend/src/alerts/error/index.tsx | 9 +-- src/frontend/src/alerts/success/index.tsx | 9 +-- .../components/AccordionComponent/index.tsx | 2 +- .../EditFlowSettingsComponent/index.tsx | 4 +- .../ExtraSidebarComponent/index.tsx | 8 +-- .../src/components/cardComponent/index.tsx | 13 +++-- .../chatComponent/buildTrigger/index.tsx | 2 +- .../components/codeAreaComponent/index.tsx | 2 +- .../components/dropdownComponent/index.tsx | 6 +- .../src/components/floatComponent/index.tsx | 6 +- .../src/components/headerComponent/index.tsx | 8 +-- .../src/components/inputComponent/index.tsx | 8 +-- .../components/inputFileComponent/index.tsx | 6 +- .../components/textAreaComponent/index.tsx | 2 +- src/frontend/src/components/ui/accordion.tsx | 2 +- src/frontend/src/components/ui/badge.tsx | 2 +- src/frontend/src/components/ui/button.tsx | 4 +- src/frontend/src/components/ui/checkbox.tsx | 2 +- .../src/components/ui/dropdown-menu.tsx | 14 ++--- src/frontend/src/components/ui/input.tsx | 4 +- src/frontend/src/components/ui/label.tsx | 2 +- src/frontend/src/components/ui/menubar.tsx | 24 ++++---- src/frontend/src/components/ui/progress.tsx | 2 +- src/frontend/src/components/ui/separator.tsx | 6 +- src/frontend/src/components/ui/table.tsx | 4 +- src/frontend/src/components/ui/textarea.tsx | 4 +- src/frontend/src/components/ui/tooltip.tsx | 2 +- src/frontend/src/contexts/alertContext.tsx | 2 +- src/frontend/src/contexts/darkContext.tsx | 2 +- src/frontend/src/contexts/locationContext.tsx | 2 +- src/frontend/src/contexts/typesContext.tsx | 10 ++-- src/frontend/src/contexts/undoRedoContext.tsx | 4 +- src/frontend/src/controllers/API/index.ts | 12 ++-- src/frontend/src/icons/AzLogo/index.tsx | 2 +- src/frontend/src/icons/Bing/index.tsx | 2 +- .../src/icons/FacebookMessenger/index.tsx | 2 +- src/frontend/src/icons/IFixIt/index.tsx | 2 +- src/frontend/src/icons/Meta/index.tsx | 2 +- src/frontend/src/icons/Searx/index.tsx | 2 +- src/frontend/src/icons/Slack/index.tsx | 2 +- src/frontend/src/icons/Word/index.tsx | 2 +- src/frontend/src/index.tsx | 4 +- src/frontend/src/modals/ApiModal/index.tsx | 58 +++++++++---------- .../src/modals/EditNodeModal/index.tsx | 12 ++-- .../NodeModal/components/ModalField/index.tsx | 6 +- src/frontend/src/modals/NodeModal/index.tsx | 11 ++-- .../modals/chatModal/chatMessage/index.tsx | 6 +- src/frontend/src/modals/chatModal/index.tsx | 5 +- src/frontend/src/modals/exportModal/index.tsx | 2 +- .../src/modals/flowSettingsModal/index.tsx | 2 +- .../formModal/chatMessage/codeBlock/index.tsx | 10 +--- .../modals/formModal/fileComponent/index.tsx | 14 ++--- .../modals/importModal/buttonBox/index.tsx | 4 +- src/frontend/src/modals/importModal/index.tsx | 8 +-- src/frontend/src/modals/promptModal/index.tsx | 5 +- .../src/modals/textAreaModal/index.tsx | 5 +- .../components/PageComponent/index.tsx | 25 ++++---- src/frontend/src/types/tabs/index.ts | 2 +- src/frontend/src/utils.ts | 24 ++++---- 62 files changed, 180 insertions(+), 243 deletions(-) diff --git a/src/backend/langflow/lcserve.py b/src/backend/langflow/lcserve.py index affc0ff79..87f69e014 100644 --- a/src/backend/langflow/lcserve.py +++ b/src/backend/langflow/lcserve.py @@ -3,9 +3,9 @@ import os # Use the JCLOUD_WORKSPACE for db URL if it's provided by JCloud. -if 'JCLOUD_WORKSPACE' in os.environ: +if "JCLOUD_WORKSPACE" in os.environ: os.environ[ - 'LANGFLOW_DATABASE_URL' + "LANGFLOW_DATABASE_URL" ] = f"sqlite:///{os.environ['JCLOUD_WORKSPACE']}/langflow.db" from langflow.main import setup_app diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 4f2e390c6..7335da19d 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -118,7 +118,7 @@ export default function App() { const removeAlert = (id: string) => { setAlertsList((prevAlertsList) => - prevAlertsList.filter((alert) => alert.id !== id), + prevAlertsList.filter((alert) => alert.id !== id) ); }; @@ -138,10 +138,7 @@ export default function App() {
-
+
{alertsList.map((alert) => (
{alert.type === "error" ? ( diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 3430125c0..313be210c 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -169,9 +169,7 @@ export default function GenericNode({
-
- {data.node.description} -
+
{data.node.description}
<> {Object.keys(data.node.template) diff --git a/src/frontend/src/alerts/error/index.tsx b/src/frontend/src/alerts/error/index.tsx index 93f30484b..d71980b7e 100644 --- a/src/frontend/src/alerts/error/index.tsx +++ b/src/frontend/src/alerts/error/index.tsx @@ -43,12 +43,13 @@ export default function ErrorAlert({ >
-
-

- {title} -

+

{title}

{list.length !== 0 ? (
    diff --git a/src/frontend/src/alerts/success/index.tsx b/src/frontend/src/alerts/success/index.tsx index e943feb8c..95eaa1ba4 100644 --- a/src/frontend/src/alerts/success/index.tsx +++ b/src/frontend/src/alerts/success/index.tsx @@ -38,15 +38,10 @@ export default function SuccessAlert({ >
    -
    -

    - {title} -

    +

    {title}

diff --git a/src/frontend/src/components/AccordionComponent/index.tsx b/src/frontend/src/components/AccordionComponent/index.tsx index 8990da245..f03a2ad5f 100644 --- a/src/frontend/src/components/AccordionComponent/index.tsx +++ b/src/frontend/src/components/AccordionComponent/index.tsx @@ -18,7 +18,7 @@ export default function AccordionComponent({ open = [], }: AccordionComponentType) { const [value, setValue] = useState( - open.length == 0 ? "" : getOpenAccordion(), + open.length == 0 ? "" : getOpenAccordion() ); function getOpenAccordion() { diff --git a/src/frontend/src/components/EditFlowSettingsComponent/index.tsx b/src/frontend/src/components/EditFlowSettingsComponent/index.tsx index 4c1d18b75..b51722ad8 100644 --- a/src/frontend/src/components/EditFlowSettingsComponent/index.tsx +++ b/src/frontend/src/components/EditFlowSettingsComponent/index.tsx @@ -47,9 +47,7 @@ export const EditFlowSettings: React.FC = ({
Name{" "} {isMaxLength && ( - - Character limit reached - + Character limit reached )}