diff --git a/src/frontend/src/components/codeTabsComponent/index.tsx b/src/frontend/src/components/codeTabsComponent/index.tsx index 0a0b691c8..3b42608d1 100644 --- a/src/frontend/src/components/codeTabsComponent/index.tsx +++ b/src/frontend/src/components/codeTabsComponent/index.tsx @@ -36,7 +36,7 @@ import { convertValuesToNumbers, hasDuplicateKeys, } from "../../utils/reactflowUtils"; -import { classNames } from "../../utils/utils"; +import { classNames, cn } from "../../utils/utils"; import AccordionComponent from "../accordionComponent"; import DictComponent from "../dictComponent"; import IconComponent from "../genericIconComponent"; @@ -45,6 +45,7 @@ import KeypairListComponent from "../keypairListComponent"; import ShadTooltip from "../shadTooltipComponent"; import { Label } from "../ui/label"; import { Switch } from "../ui/switch"; +import { Button } from "../ui/button"; export default function CodeTabsComponent({ flow, @@ -93,28 +94,6 @@ export default function CodeTabsComponent({ return node.data.node.template[templateParam].type; }; - const downloadAsFile = () => { - const fileExtension = tabs[activeTab].language || ".txt"; - const suggestedFileName = `${"generated-code."}${fileExtension}`; - const fileName = window.prompt("Enter the file name.", suggestedFileName); - - if (!fileName) { - // user pressed cancel on prompt - return; - } - - const blob = new Blob([tabs[activeTab].code], { type: "text/plain" }); - const url = URL.createObjectURL(blob); - const link = document.createElement("a"); - link.download = fileName; - link.href = url; - link.style.display = "none"; - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); - URL.revokeObjectURL(url); - }; - return ( )} -
+
{tweaks && ( -
2 - ? "hidden" - : "relative top-[2.5px] flex gap-2" - } - > +
2 ? "hidden" : "flex gap-2"}>
)} - {allowExport && ( - -
- - Export Flow -
-
- )} {Number(activeTab) < 4 && ( <> - - + )}
diff --git a/src/frontend/src/style/applies.css b/src/frontend/src/style/applies.css index 07ab9b592..f9b1b3278 100644 --- a/src/frontend/src/style/applies.css +++ b/src/frontend/src/style/applies.css @@ -330,7 +330,7 @@ @apply grid w-full gap-4 p-4 md:grid-cols-2 lg:grid-cols-4; } .generic-node-div { - @apply relative flex flex-col justify-center bg-background; + @apply relative flex flex-col justify-center bg-background transition-all hover:shadow-node; } .generic-node-div-title { @apply flex w-full items-center gap-2 border-b bg-muted p-4; diff --git a/src/frontend/tailwind.config.js b/src/frontend/tailwind.config.js index ee6413292..6f99f7b58 100644 --- a/src/frontend/tailwind.config.js +++ b/src/frontend/tailwind.config.js @@ -143,6 +143,7 @@ module.exports = { }, boxShadow: { "frozen-ring": "0 0 10px 2px rgba(128, 190, 230, 0.5)", + node: "0 0px 15px -3px rgb(0 0 0 / 0.1), 0 0px 6px -4px rgb(0 0 0 / 0.1);", "frosted-ring": "0 0 10px 2px rgba(128, 190, 230, 0.7)", }, backdropBlur: {