2024-06-24 22:39:54 +05:30
|
|
|
import React, { FC, useState } from 'react';
|
|
|
|
|
import { InterpretationButtons } from "./InterpretationButtons";
|
|
|
|
|
import { AddButton } from "../atoms/buttons/AddButton";
|
|
|
|
|
import { GenericModal } from "../atoms/GenericModal";
|
|
|
|
|
import { PairEditForm } from "./PairEditForm";
|
2024-07-31 22:46:38 +05:30
|
|
|
import { WhereWhatPair, WorkflowFile } from "maxun-core";
|
2024-06-24 22:39:54 +05:30
|
|
|
import { AddPair } from "../../api/workflow";
|
|
|
|
|
import { Button, Stack } from "@mui/material";
|
|
|
|
|
import { FastForward } from "@mui/icons-material";
|
|
|
|
|
import { useSocketStore } from "../../context/socket";
|
|
|
|
|
import { useGlobalInfoStore } from "../../context/globalInfo";
|
|
|
|
|
|
2024-10-19 14:02:08 +05:30
|
|
|
interface SidePanelHeaderProps {
|
|
|
|
|
setShowOutputData: (show: boolean) => void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const SidePanelHeader: React.FC<SidePanelHeaderProps> = ({ setShowOutputData }) => {
|
2024-06-24 22:39:54 +05:30
|
|
|
|
2024-10-19 14:02:30 +05:30
|
|
|
const [steppingIsDisabled, setSteppingIsDisabled] = useState(true);
|
|
|
|
|
const { socket } = useSocketStore();
|
2024-06-24 22:39:54 +05:30
|
|
|
|
2024-10-19 14:02:30 +05:30
|
|
|
const handleStep = () => {
|
|
|
|
|
socket?.emit('step');
|
|
|
|
|
};
|
2024-06-24 22:39:54 +05:30
|
|
|
|
2024-10-19 14:02:30 +05:30
|
|
|
return (
|
|
|
|
|
<div style={{ width: 'inherit' }}>
|
|
|
|
|
<InterpretationButtons enableStepping={(isPaused) => setSteppingIsDisabled(!isPaused)} setShowOutputData={setShowOutputData} />
|
|
|
|
|
{/* <Button
|
2024-06-24 22:39:54 +05:30
|
|
|
variant='outlined'
|
|
|
|
|
disabled={steppingIsDisabled}
|
|
|
|
|
onClick={handleStep}
|
|
|
|
|
sx={{marginLeft:'15px'}}
|
|
|
|
|
>
|
|
|
|
|
step
|
|
|
|
|
<FastForward/>
|
2024-10-19 14:02:08 +05:30
|
|
|
</Button> */}
|
2024-10-19 14:02:30 +05:30
|
|
|
<hr />
|
|
|
|
|
</div>
|
|
|
|
|
);
|
2024-06-24 22:39:54 +05:30
|
|
|
};
|