From e491064662dbf68720288cf9c69475c27d91ba77 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Mon, 12 Jun 2023 20:44:35 -0300 Subject: [PATCH] Removed menubar edit and file, added all into the project name --- langflow.db | Bin 28672 -> 28672 bytes src/frontend/src/App.tsx | 4 +- .../components/menuBar/index.tsx | 56 +++++++----------- .../src/components/headerComponent/index.tsx | 16 ++--- src/frontend/src/pages/MainPage/index.tsx | 2 +- 5 files changed, 34 insertions(+), 44 deletions(-) rename src/frontend/src/{pages/MainPage => components/headerComponent}/components/menuBar/index.tsx (79%) diff --git a/langflow.db b/langflow.db index c5b0c3b357135e75cb207ed41432cdffc8a224de..01cb4020956d67250e6823e2d241538eb876b3a5 100644 GIT binary patch delta 407 zcmaiwze@s90LSlTE#ABLb!k#Vsn)pjJ@syC2qOaXU+8`oVFiJ>1ZR6-Go+~2R&a+CtU-XV zdv?m!S)Pq)U9By%iCrx;=)`1ND{s}R)fK;bA-KaG&oW#gOy3Jk zugGmf9YTby^PFpXg`(jI%Q2ilnA~>UobMJ~VFgBf2r23XOZR1R>Yb!0D=F+3PppSc z9I*{d;~Gn>$x7@>W;3&Fc_vmSqrB*#G|EJk&AD2%h>n6EeB%=zc*6^x(Zd6}xJ5^1 z^>f6>V;Z4@P+Q&kd<6IkzVM32=+7HST;Le{2(be{0!nCw70M`$rOE$~sthZ8nLkuA Bbf5qL delta 158 zcmWN~Jqtlm9Dwn2&ZzvKY_~{mb{Uur78@Ty8CXm*-)mRb%Y;>S9cA?exQm4(rLb6} zERwtbdLI9x{fizXwG2~bEz9~GCniR*WlEC*T6Qv%mK4QUH* -
- +
+
{ let color = current_flow.style?.color || "bg-blue-200"; return ( -
- ⛓️ - {activeTab === "myflow" && ( -
-
- - {emoji} - - + + + { if (value !== "") { @@ -75,11 +67,12 @@ export const MenuBar = ({ activeTab, setRename, rename, flows, tabId }) => { rename={rename} setRename={setRename} /> -
- - - File + + + + File + { openPopUp(); @@ -104,11 +97,10 @@ export const MenuBar = ({ activeTab, setRename, rename, flows, tabId }) => { Code - - - - Edit - + + + Edit + { handleSaveFlow(current_flow); @@ -125,12 +117,10 @@ export const MenuBar = ({ activeTab, setRename, rename, flows, tabId }) => { Rename - - - - Flows - - + + + Flows + { @@ -158,10 +148,8 @@ export const MenuBar = ({ activeTab, setRename, rename, flows, tabId }) => { + -
- )} -
); }; diff --git a/src/frontend/src/components/headerComponent/index.tsx b/src/frontend/src/components/headerComponent/index.tsx index 7951345f3..ac8d85cf3 100644 --- a/src/frontend/src/components/headerComponent/index.tsx +++ b/src/frontend/src/components/headerComponent/index.tsx @@ -1,4 +1,4 @@ -import { SunIcon, MoonIcon, BellIcon } from "lucide-react"; +import { SunIcon, MoonIcon, BellIcon} from "lucide-react"; import { useContext, useState, useEffect } from "react"; import { FaGithub } from "react-icons/fa"; import { Button } from "../ui/button"; @@ -8,7 +8,8 @@ import { alertContext } from "../../contexts/alertContext"; import { darkContext } from "../../contexts/darkContext"; import { PopUpContext } from "../../contexts/popUpContext"; import { typesContext } from "../../contexts/typesContext"; -import MenuBar from "../../pages/MainPage/components/menuBar"; +import MenuBar from "./components/menuBar"; +import { Link } from "react-router-dom"; export default function Header(){ const { @@ -35,7 +36,10 @@ export default function Header(){ } }, [addFlow, flows.length, templates]); return ( -
+
+ +
+ ⛓️ {flows.findIndex((f) => tabId === f.id) !== -1 && - } -
- - + } +
diff --git a/src/frontend/src/pages/MainPage/index.tsx b/src/frontend/src/pages/MainPage/index.tsx index 36e7846be..a1d8ca8b1 100644 --- a/src/frontend/src/pages/MainPage/index.tsx +++ b/src/frontend/src/pages/MainPage/index.tsx @@ -22,7 +22,7 @@ import _ from "lodash"; import { updateFlowInDatabase } from "../../controllers/API"; import { CardComponent } from "./components/cardComponent"; -import { MenuBar } from "./components/menuBar"; +import { MenuBar } from "../../components/headerComponent/components/menuBar"; export default function HomePage() { const { flows,