diff --git a/src/frontend/src/pages/MainPage/components/menuBar/index.tsx b/src/frontend/src/pages/MainPage/components/menuBar/index.tsx index f8a1ccce9..b19dabbf3 100644 --- a/src/frontend/src/pages/MainPage/components/menuBar/index.tsx +++ b/src/frontend/src/pages/MainPage/components/menuBar/index.tsx @@ -1,6 +1,7 @@ import React, { useContext } from "react"; import { TabsContext } from "../../../../contexts/tabsContext"; import { PopUpContext } from "../../../../contexts/popUpContext"; +import { Save, Edit, Upload, Download, Code, Plus } from "lucide-react"; import { Menubar, MenubarContent, @@ -10,14 +11,7 @@ import { MenubarRadioGroup, MenubarRadioItem, } from "../../../../components/ui/menubar"; -import { - ArrowUpTrayIcon, - ArrowDownTrayIcon, - CodeBracketSquareIcon, - CloudArrowUpIcon, - PencilSquareIcon, - PlusIcon, -} from "@heroicons/react/24/outline"; + import RenameLabel from "../../../../components/ui/rename-label"; import _ from "lodash"; import ImportModal from "../../../../modals/importModal"; @@ -48,37 +42,49 @@ export const MenuBar = ({ activeTab, setRename, rename, flows, tabIndex }) => { setErrorData(err); } } + let current_flow = flows[tabIndex]; + + // robot emoji + let emoji = current_flow.style?.emoji || "🤖"; + let color = current_flow.style?.color || "bg-blue-200"; return (
⛓️ {activeTab === "myflow" && (
+
+ + {emoji} + + { + if (value !== "") { + let newFlow = _.cloneDeep(flows[tabIndex]); + newFlow.name = value; + updateFlow(newFlow); + } + }} + rename={rename} + setRename={setRename} + /> +
- - - { - if (value !== "") { - let newFlow = _.cloneDeep(flows[tabIndex]); - newFlow.name = value; - updateFlow(newFlow); - } - }} - rename={rename} - setRename={setRename} - /> - - + File { openPopUp(); }} > - + Import { openPopUp(); }} > - + Export { - openPopUp(); + openPopUp(); }} > - + Code @@ -107,7 +113,7 @@ export const MenuBar = ({ activeTab, setRename, rename, flows, tabIndex }) => { handleSaveFlow(flows[tabIndex]); }} > - + Save { setRename(true); }} > - + Rename @@ -132,7 +138,7 @@ export const MenuBar = ({ activeTab, setRename, rename, flows, tabIndex }) => { {flows.map((flow, idx) => { return ( - {flow.name} + {emoji} {flow.name} ); })} @@ -142,7 +148,7 @@ export const MenuBar = ({ activeTab, setRename, rename, flows, tabIndex }) => { handleAddFlow(); }} > - + Add Flow