chore: lint
This commit is contained in:
@@ -459,7 +459,7 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
Object.keys(step.fields).length > 0
|
Object.keys(step.fields).length > 0
|
||||||
);
|
);
|
||||||
|
|
||||||
// Disable the button if there are no valid list selectors or if there are unconfirmed list text fields
|
// Disable the button if there are no valid list selectors or if there are unconfirmed list text fields
|
||||||
return !hasValidListSelector || hasUnconfirmedListTextFields;
|
return !hasValidListSelector || hasUnconfirmedListTextFields;
|
||||||
}, [captureStage, browserSteps, hasUnconfirmedListTextFields]);
|
}, [captureStage, browserSteps, hasUnconfirmedListTextFields]);
|
||||||
|
|
||||||
@@ -470,7 +470,7 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
{/* <SimpleBox height={60} width='100%' background='lightGray' radius='0%'>
|
{/* <SimpleBox height={60} width='100%' background='lightGray' radius='0%'>
|
||||||
<Typography sx={{ padding: '10px' }}>Last action: {` ${lastAction}`}</Typography>
|
<Typography sx={{ padding: '10px' }}>Last action: {` ${lastAction}`}</Typography>
|
||||||
</SimpleBox> */}
|
</SimpleBox> */}
|
||||||
<ActionDescriptionBox isDarkMode={isDarkMode} />
|
<ActionDescriptionBox isDarkMode={isDarkMode} />
|
||||||
<Box display="flex" flexDirection="column" gap={2} style={{ margin: '13px' }}>
|
<Box display="flex" flexDirection="column" gap={2} style={{ margin: '13px' }}>
|
||||||
{!getText && !getScreenshot && !getList && showCaptureList && <Button variant="contained" onClick={startGetList}>{t('right_panel.buttons.capture_list')}</Button>}
|
{!getText && !getScreenshot && !getList && showCaptureList && <Button variant="contained" onClick={startGetList}>{t('right_panel.buttons.capture_list')}</Button>}
|
||||||
|
|
||||||
@@ -501,9 +501,9 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{captureStage === 'initial' ? t('right_panel.buttons.confirm_capture') :
|
{captureStage === 'initial' ? t('right_panel.buttons.confirm_capture') :
|
||||||
captureStage === 'pagination' ? t('right_panel.buttons.confirm_pagination') :
|
captureStage === 'pagination' ? t('right_panel.buttons.confirm_pagination') :
|
||||||
captureStage === 'limit' ? t('right_panel.buttons.confirm_limit') :
|
captureStage === 'limit' ? t('right_panel.buttons.confirm_limit') :
|
||||||
t('right_panel.buttons.finish_capture')}
|
t('right_panel.buttons.finish_capture')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
@@ -540,7 +540,7 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
borderColor: '#ff00c3 !important',
|
borderColor: '#ff00c3 !important',
|
||||||
backgroundColor: paginationType === 'clickLoadMore' ? '#ff00c3 !important' : 'whitesmoke !important',
|
backgroundColor: paginationType === 'clickLoadMore' ? '#ff00c3 !important' : 'whitesmoke !important',
|
||||||
}}>
|
}}>
|
||||||
{t('right_panel.pagination.click_load_more')}
|
{t('right_panel.pagination.click_load_more')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant={paginationType === 'scrollDown' ? "contained" : "outlined"}
|
variant={paginationType === 'scrollDown' ? "contained" : "outlined"}
|
||||||
@@ -593,35 +593,35 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
<FormControlLabel value="custom" control={<Radio />} label={t('right_panel.limit.custom')} />
|
<FormControlLabel value="custom" control={<Radio />} label={t('right_panel.limit.custom')} />
|
||||||
{limitType === 'custom' && (
|
{limitType === 'custom' && (
|
||||||
<TextField
|
<TextField
|
||||||
type="number"
|
type="number"
|
||||||
value={customLimit}
|
value={customLimit}
|
||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
const value = parseInt(e.target.value);
|
const value = parseInt(e.target.value);
|
||||||
// Only update if the value is greater than or equal to 1 or if the field is empty
|
// Only update if the value is greater than or equal to 1 or if the field is empty
|
||||||
if (e.target.value === '' || value >= 1) {
|
if (e.target.value === '' || value >= 1) {
|
||||||
updateCustomLimit(e.target.value);
|
updateCustomLimit(e.target.value);
|
||||||
}
|
|
||||||
}}
|
|
||||||
inputProps={{
|
|
||||||
min: 1,
|
|
||||||
onKeyPress: (e: React.KeyboardEvent<HTMLInputElement>) => {
|
|
||||||
const value = (e.target as HTMLInputElement).value + e.key;
|
|
||||||
if (parseInt(value) < 1) {
|
|
||||||
e.preventDefault();
|
|
||||||
}
|
}
|
||||||
}
|
}}
|
||||||
}}
|
inputProps={{
|
||||||
placeholder={t('right_panel.limit.enter_number')}
|
min: 1,
|
||||||
sx={{
|
onKeyPress: (e: React.KeyboardEvent<HTMLInputElement>) => {
|
||||||
marginLeft: '10px',
|
const value = (e.target as HTMLInputElement).value + e.key;
|
||||||
'& input': {
|
if (parseInt(value) < 1) {
|
||||||
padding: '10px',
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
placeholder={t('right_panel.limit.enter_number')}
|
||||||
|
sx={{
|
||||||
|
marginLeft: '10px',
|
||||||
|
'& input': {
|
||||||
|
padding: '10px',
|
||||||
|
|
||||||
},
|
},
|
||||||
width: '150px',
|
width: '150px',
|
||||||
background: isDarkMode ? "#1E2124" : 'white',
|
background: isDarkMode ? "#1E2124" : 'white',
|
||||||
color: isDarkMode ? "white" : 'black', // Ensure the text field does not go outside the panel
|
color: isDarkMode ? "white" : 'black', // Ensure the text field does not go outside the panel
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -642,7 +642,7 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
borderColor: '#ff00c3 !important',
|
borderColor: '#ff00c3 !important',
|
||||||
backgroundColor: 'whitesmoke !important',
|
backgroundColor: 'whitesmoke !important',
|
||||||
}}>
|
}}>
|
||||||
{t('right_panel.buttons.confirm')}
|
{t('right_panel.buttons.confirm')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
@@ -653,7 +653,7 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
borderColor: '#ff00c3 !important',
|
borderColor: '#ff00c3 !important',
|
||||||
backgroundColor: 'whitesmoke !important',
|
backgroundColor: 'whitesmoke !important',
|
||||||
}}>
|
}}>
|
||||||
{t('right_panel.buttons.discard')}
|
{t('right_panel.buttons.discard')}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
@@ -673,7 +673,7 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
borderColor: '#ff00c3 !important',
|
borderColor: '#ff00c3 !important',
|
||||||
backgroundColor: 'whitesmoke !important',
|
backgroundColor: 'whitesmoke !important',
|
||||||
}}>
|
}}>
|
||||||
{t('right_panel.buttons.discard')}
|
{t('right_panel.buttons.discard')}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
@@ -750,7 +750,7 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
<>
|
<>
|
||||||
<Typography>{t('right_panel.messages.list_selected')}</Typography>
|
<Typography>{t('right_panel.messages.list_selected')}</Typography>
|
||||||
{Object.entries(step.fields).map(([key, field]) => (
|
{Object.entries(step.fields).map(([key, field]) => (
|
||||||
<Box key={key} sx={{background: `${isDarkMode ? "#1E2124" : 'white'}` }}>
|
<Box key={key} sx={{ background: `${isDarkMode ? "#1E2124" : 'white'}` }}>
|
||||||
<TextField
|
<TextField
|
||||||
label={t('right_panel.fields.field_label')}
|
label={t('right_panel.fields.field_label')}
|
||||||
value={field.label || ''}
|
value={field.label || ''}
|
||||||
|
|||||||
Reference in New Issue
Block a user