diff --git a/src/components/run/RunSettings.tsx b/src/components/run/RunSettings.tsx index a35d2f28..3da0bab8 100644 --- a/src/components/run/RunSettings.tsx +++ b/src/components/run/RunSettings.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useState } from "react"; import { GenericModal } from "../ui/GenericModal"; import { MenuItem, TextField, Typography, Switch, FormControlLabel } from "@mui/material"; import { Dropdown } from "../ui/DropdownMui"; @@ -29,24 +29,38 @@ export const RunSettingsModal = ({ isOpen, handleStart, handleClose, isTask, par const [showInterpreterSettings, setShowInterpreterSettings] = useState(false); + const startImmediately = () => { + handleStart(settings); // Start functionality directly + }; + + // Start directly without opening the modal + if (!showInterpreterSettings) { + startImmediately(); + return null; // Do not render the modal + } + return ( -
+
{isTask && ( - Recording parameters: + + Recording parameters: + {params?.map((item, index) => ( setShowInterpreterSettings(!showInterpreterSettings)} />} + control={ + + setShowInterpreterSettings(!showInterpreterSettings) + } + /> + } label="Developer Mode Settings" - sx={{ margin: '20px 0px' }} + sx={{ margin: "20px 0px" }} /> {showInterpreterSettings && ( )} - +
);