diff --git a/public/locales/de.json b/public/locales/de.json index db0ce562..debf80f6 100644 --- a/public/locales/de.json +++ b/public/locales/de.json @@ -161,6 +161,7 @@ "confirm_pagination": "Paginierung bestätigen", "confirm_limit": "Limit bestätigen", "finish_capture": "Erfassung abschließen", + "back": "Zurück", "finish": "Fertig", "cancel": "Abbrechen", "delete": "Löschen" diff --git a/public/locales/en.json b/public/locales/en.json index 9b4defbc..70ded861 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -162,6 +162,7 @@ "confirm_pagination": "Confirm Pagination", "confirm_limit": "Confirm Limit", "finish_capture": "Finish Capture", + "back": "Back", "finish": "Finish", "cancel": "Cancel", "delete": "Delete" diff --git a/public/locales/es.json b/public/locales/es.json index e897914e..5cde0c70 100644 --- a/public/locales/es.json +++ b/public/locales/es.json @@ -162,6 +162,7 @@ "confirm_pagination": "Confirmar Paginación", "confirm_limit": "Confirmar Límite", "finish_capture": "Finalizar Captura", + "back": "Atrás", "finish": "Finalizar", "cancel": "Cancelar", "delete": "Eliminar" diff --git a/public/locales/ja.json b/public/locales/ja.json index 9ae226dc..a0d18c67 100644 --- a/public/locales/ja.json +++ b/public/locales/ja.json @@ -162,6 +162,7 @@ "confirm_pagination": "ページネーションを確認", "confirm_limit": "制限を確認", "finish_capture": "取得を完了", + "back": "戻る", "finish": "完了", "cancel": "キャンセル", "delete": "削除" diff --git a/public/locales/zh.json b/public/locales/zh.json index 344a58a7..e55565f8 100644 --- a/public/locales/zh.json +++ b/public/locales/zh.json @@ -162,6 +162,7 @@ "confirm_pagination": "确认分页", "confirm_limit": "确认限制", "finish_capture": "完成捕获", + "back": "返回", "finish": "完成", "cancel": "取消", "delete": "删除" diff --git a/src/components/organisms/BrowserWindow.tsx b/src/components/organisms/BrowserWindow.tsx index c7e9fc0f..b69a0921 100644 --- a/src/components/organisms/BrowserWindow.tsx +++ b/src/components/organisms/BrowserWindow.tsx @@ -68,7 +68,7 @@ export const BrowserWindow = () => { const { socket } = useSocketStore(); const { notify } = useGlobalInfoStore(); - const { getText, getList, paginationMode, paginationType, limitMode } = useActionContext(); + const { getText, getList, paginationMode, paginationType, limitMode, captureStage } = useActionContext(); const { addTextStep, addListStep } = useBrowserSteps(); const onMouseMove = (e: MouseEvent) => { @@ -144,7 +144,7 @@ export const BrowserWindow = () => { // for non-list steps setHighlighterData(data); } - }, [highlighterData, getList, socket, listSelector, paginationMode, paginationType]); + }, [highlighterData, getList, socket, listSelector, paginationMode, paginationType, captureStage]); useEffect(() => { @@ -158,6 +158,13 @@ export const BrowserWindow = () => { }; }, [socket, onMouseMove]); + useEffect(() => { + if (captureStage === 'initial' && listSelector) { + socket?.emit('setGetList', { getList: true }); + socket?.emit('listSelector', { selector: listSelector }); + } + }, [captureStage, listSelector, socket]); + const handleClick = (e: React.MouseEvent) => { if (highlighterData && canvasRef?.current) { const canvasRect = canvasRef.current.getBoundingClientRect(); diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index 991301c3..8211a64a 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -382,6 +382,23 @@ export const RightSidePanel: React.FC = ({ onFinishCapture } }, [captureStage, paginationType, limitType, customLimit, startPaginationMode, stopPaginationMode, startLimitMode, stopLimitMode, notify, stopCaptureAndEmitGetListSettings, getListSettingsObject]); + const handleBackCaptureList = useCallback(() => { + switch (captureStage) { + case 'limit': + stopLimitMode(); + setShowLimitOptions(false); + startPaginationMode(); + setShowPaginationOptions(true); + setCaptureStage('pagination'); + break; + case 'pagination': + stopPaginationMode(); + setShowPaginationOptions(false); + setCaptureStage('initial'); + break; + } + }, [captureStage, stopLimitMode, startPaginationMode, stopPaginationMode]); + const handlePaginationSettingSelect = (option: PaginationType) => { updatePaginationType(option); }; @@ -456,6 +473,14 @@ export const RightSidePanel: React.FC = ({ onFinishCapture {getList && ( <> + {(captureStage === 'pagination' || captureStage === 'limit') && ( + + )} - + )}