Merge pull request #881 from getmaxun/preview-fix
fix: output preview for capture text action
This commit is contained in:
@@ -332,6 +332,8 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
|
||||
shouldOpenDrawer = true;
|
||||
}
|
||||
lastListDataLength.current = captureListData.length;
|
||||
} else if (hasScrapeListAction && captureListData.length === 0) {
|
||||
lastListDataLength.current = 0;
|
||||
}
|
||||
|
||||
if (hasScrapeSchemaAction && captureTextData.length > 0 && !getText) {
|
||||
@@ -341,6 +343,8 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
|
||||
shouldOpenDrawer = true;
|
||||
}
|
||||
lastTextDataLength.current = captureTextData.length;
|
||||
} else if (hasScrapeSchemaAction && captureTextData.length === 0) {
|
||||
lastTextDataLength.current = 0;
|
||||
}
|
||||
|
||||
if (hasScreenshotAction && screenshotData.length > 0) {
|
||||
@@ -350,6 +354,8 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
|
||||
shouldOpenDrawer = true;
|
||||
}
|
||||
lastScreenshotDataLength.current = screenshotData.length;
|
||||
} else if (hasScreenshotAction && screenshotData.length === 0) {
|
||||
lastScreenshotDataLength.current = 0;
|
||||
}
|
||||
|
||||
const getLatestCaptureType = () => {
|
||||
@@ -492,7 +498,7 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
|
||||
{t('interpretation_log.titles.output_preview')}
|
||||
</Typography>
|
||||
|
||||
{!(hasScrapeListAction || hasScrapeSchemaAction || hasScreenshotAction) && (
|
||||
{!(hasScrapeListAction || hasScrapeSchemaAction || hasScreenshotAction) && !showPreviewData && availableTabs.length === 0 && (
|
||||
<Grid container justifyContent="center" alignItems="center" style={{ height: '100%' }}>
|
||||
<Grid item>
|
||||
<Typography variant="h6" gutterBottom align="left">
|
||||
|
||||
Reference in New Issue
Block a user