feat: start/stop bw actions
This commit is contained in:
@@ -21,7 +21,7 @@ export const RightSidePanel = ({ pairForEdit }: RightSidePanelProps) => {
|
|||||||
const [isSettingsDisplayed, setIsSettingsDisplayed] = React.useState<boolean>(false);
|
const [isSettingsDisplayed, setIsSettingsDisplayed] = React.useState<boolean>(false);
|
||||||
|
|
||||||
const { lastAction } = useGlobalInfoStore();
|
const { lastAction } = useGlobalInfoStore();
|
||||||
const { handleGetText, handleGetScreenshot } = useActionContext();
|
const { getText, getScreenshot, startGetText, stopGetText, startGetScreenshot, stopGetScreenshot } = useActionContext();
|
||||||
|
|
||||||
const handleChange = (event: React.SyntheticEvent, newValue: string) => {
|
const handleChange = (event: React.SyntheticEvent, newValue: string) => {
|
||||||
setContent(newValue);
|
setContent(newValue);
|
||||||
@@ -39,6 +39,7 @@ export const RightSidePanel = ({ pairForEdit }: RightSidePanelProps) => {
|
|||||||
}
|
}
|
||||||
}, [pairForEdit])
|
}, [pairForEdit])
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Paper
|
<Paper
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
@@ -82,12 +83,18 @@ export const RightSidePanel = ({ pairForEdit }: RightSidePanelProps) => {
|
|||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
|
|
||||||
<Button variant="contained" onClick={handleGetText}>
|
<Button variant="contained" onClick={startGetText} disabled={getText}>
|
||||||
Capture Text
|
Capture Text
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="contained" onClick={handleGetScreenshot}>
|
<Button variant="contained" onClick={stopGetText} disabled={!getText}>
|
||||||
Capture Screenshot
|
Stop Capture Text
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button variant="contained" onClick={startGetScreenshot} disabled={getScreenshot}>
|
||||||
|
Capture Screenshot
|
||||||
|
</Button>
|
||||||
|
<Button variant="contained" onClick={stopGetScreenshot} disabled={!getScreenshot}>
|
||||||
|
Stop Capture Screenshot
|
||||||
|
</Button>
|
||||||
</Paper>
|
</Paper>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user