diff --git a/pkgs/ui/src/app/nodes/NodeList.tsx b/pkgs/ui/src/app/nodes/NodeList.tsx index 978a3b135..f53d3757a 100644 --- a/pkgs/ui/src/app/nodes/NodeList.tsx +++ b/pkgs/ui/src/app/nodes/NodeList.tsx @@ -33,6 +33,7 @@ import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp"; import NodePieChart, { PieData } from "./NodePieChart"; import Fab from "@mui/material/Fab"; import AddIcon from "@mui/icons-material/Add"; +import Link from "next/link"; import Grid2 from "@mui/material/Unstable_Grid2"; // Grid version 2 import { @@ -118,7 +119,8 @@ function stableSort( return stabilizedThis.map((el) => el[0]); } -function BasicSpeedDial() { +function CrudSpeedDial(props: { selected: string | undefined }) { + const { selected } = props; const [open, setOpen] = React.useState(false); function handleClose(event: any, reason: CloseReason) { @@ -133,19 +135,34 @@ function BasicSpeedDial() { } } + const isSomethingSelected = selected != undefined; + + function editDial() { + if (isSomethingSelected) { + return ( + + + + ); + } else { + return ; + } + } + return ( } direction="down" @@ -153,13 +170,24 @@ function BasicSpeedDial() { onOpen={handleOpen} open={open} > - } tooltipTitle="Edit" /> - } tooltipTitle="Add" /> + + + + } + tooltipTitle="Add" + /> + } + icon={ + + } tooltipTitle="Delete" /> + ); @@ -267,7 +295,7 @@ function EnhancedTableToolbar(props: EnhancedTableToolbarProps) { return ( - +