////////// PROJECT FILE SEPARATION LINE ////////// CODE AFTER THIS LINE ARE FROM: /Data/WebUI/src/Dialogs.jsx import React from "react"; import { Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, Menu, MenuItem, TextField } from "@mui/material"; export function CloseAllDialog({ open, onClose, onConfirm }) { return ( Close All Flow Tabs? This will remove all existing flow tabs and create a fresh tab named Flow 1. ); } export function CreditsDialog({ open, onClose }) { return ( Borealis Logo Borealis - Automation Platform Designed by Nicole Rappe @{" "} Bunny Lab ); } export function RenameTabDialog({ open, value, onChange, onCancel, onSave }) { return ( Rename Tab onChange(e.target.value)} sx={{ "& .MuiOutlinedInput-root": { backgroundColor: "#2a2a2a", color: "#ccc", "& fieldset": { borderColor: "#444" }, "&:hover fieldset": { borderColor: "#666" } }, label: { color: "#aaa" }, mt: 1 }} /> ); } export function RenameWorkflowDialog({ open, value, onChange, onCancel, onSave }) { return ( Rename Workflow onChange(e.target.value)} sx={{ "& .MuiOutlinedInput-root": { backgroundColor: "#2a2a2a", color: "#ccc", "& fieldset": { borderColor: "#444" }, "&:hover fieldset": { borderColor: "#666" } }, label: { color: "#aaa" }, mt: 1 }} /> ); } export function RenameFolderDialog({ open, value, onChange, onCancel, onSave, title = "Folder Name", confirmText = "Save" }) { return ( {title} onChange(e.target.value)} sx={{ "& .MuiOutlinedInput-root": { backgroundColor: "#2a2a2a", color: "#ccc", "& fieldset": { borderColor: "#444" }, "&:hover fieldset": { borderColor: "#666" } }, label: { color: "#aaa" }, mt: 1 }} /> ); } export function NewWorkflowDialog({ open, value, onChange, onCancel, onCreate }) { return ( New Workflow onChange(e.target.value)} sx={{ "& .MuiOutlinedInput-root": { backgroundColor: "#2a2a2a", color: "#ccc", "& fieldset": { borderColor: "#444" }, "&:hover fieldset": { borderColor: "#666" } }, label: { color: "#aaa" }, mt: 1 }} /> ); } export function ClearDeviceActivityDialog({ open, onCancel, onConfirm }) { return ( Clear Device Activity All device activity history will be cleared, are you sure? ); } export function SaveWorkflowDialog({ open, value, onChange, onCancel, onSave }) { return ( Save Workflow onChange(e.target.value)} sx={{ "& .MuiOutlinedInput-root": { backgroundColor: "#2a2a2a", color: "#ccc", "& fieldset": { borderColor: "#444" }, "&:hover fieldset": { borderColor: "#666" } }, label: { color: "#aaa" }, mt: 1 }} /> ); } export function ConfirmDeleteDialog({ open, message, onCancel, onConfirm }) { return ( Confirm Delete {message} ); } export function DeleteDeviceDialog({ open, onCancel, onConfirm }) { return ( Remove Device Are you sure you want to remove this device? If the agent is still running, it will automatically re-enroll the device. ); } export function TabContextMenu({ anchor, onClose, onRename, onCloseTab }) { return ( Rename Close Workflow ); } export function CreateCustomViewDialog({ open, value, onChange, onCancel, onSave }) { return ( Create a New Custom View Saving a view will save column order, visibility, and filters. onChange(e.target.value)} placeholder="Add a name for this custom view" sx={{ "& .MuiOutlinedInput-root": { backgroundColor: "#2a2a2a", color: "#ccc", "& fieldset": { borderColor: "#444" }, "&:hover fieldset": { borderColor: "#666" } }, label: { color: "#aaa" }, mt: 1 }} /> ); } export function RenameCustomViewDialog({ open, value, onChange, onCancel, onSave }) { return ( Rename Custom View onChange(e.target.value)} sx={{ "& .MuiOutlinedInput-root": { backgroundColor: "#2a2a2a", color: "#ccc", "& fieldset": { borderColor: "#444" }, "&:hover fieldset": { borderColor: "#666" } }, label: { color: "#aaa" }, mt: 1 }} /> ); } export function CreateSiteDialog({ open, onCancel, onCreate }) { const [name, setName] = React.useState(""); const [description, setDescription] = React.useState(""); React.useEffect(() => { if (open) { setName(""); setDescription(""); } }, [open]); return ( Create Site Create a new site and optionally add a description. setName(e.target.value)} sx={{ "& .MuiOutlinedInput-root": { backgroundColor: "#2a2a2a", color: "#ccc", "& fieldset": { borderColor: "#444" }, "&:hover fieldset": { borderColor: "#666" } }, label: { color: "#aaa" }, mt: 1 }} /> setDescription(e.target.value)} sx={{ "& .MuiOutlinedInput-root": { backgroundColor: "#2a2a2a", color: "#ccc", "& fieldset": { borderColor: "#444" }, "&:hover fieldset": { borderColor: "#666" } }, label: { color: "#aaa" }, mt: 2 }} /> ); }