feat: notify on list selection
This commit is contained in:
@@ -7,6 +7,7 @@ import { Highlighter } from "../atoms/Highlighter";
|
|||||||
import { GenericModal } from '../atoms/GenericModal';
|
import { GenericModal } from '../atoms/GenericModal';
|
||||||
import { useActionContext } from '../../context/browserActions';
|
import { useActionContext } from '../../context/browserActions';
|
||||||
import { useBrowserSteps, TextStep } from '../../context/browserSteps';
|
import { useBrowserSteps, TextStep } from '../../context/browserSteps';
|
||||||
|
import { useGlobalInfoStore } from '../../context/globalInfo';
|
||||||
|
|
||||||
interface ElementInfo {
|
interface ElementInfo {
|
||||||
tagName: string;
|
tagName: string;
|
||||||
@@ -64,6 +65,7 @@ export const BrowserWindow = () => {
|
|||||||
const [paginationSelector, setPaginationSelector] = useState<string>('');
|
const [paginationSelector, setPaginationSelector] = useState<string>('');
|
||||||
|
|
||||||
const { socket } = useSocketStore();
|
const { socket } = useSocketStore();
|
||||||
|
const { notify } = useGlobalInfoStore();
|
||||||
//const { width, height } = useBrowserDimensionsStore();
|
//const { width, height } = useBrowserDimensionsStore();
|
||||||
const { getText, getList, paginationMode, paginationType, limitMode } = useActionContext();
|
const { getText, getList, paginationMode, paginationType, limitMode } = useActionContext();
|
||||||
const { addTextStep, addListStep } = useBrowserSteps();
|
const { addTextStep, addListStep } = useBrowserSteps();
|
||||||
@@ -206,6 +208,7 @@ export const BrowserWindow = () => {
|
|||||||
|
|
||||||
if (getList === true && !listSelector) {
|
if (getList === true && !listSelector) {
|
||||||
setListSelector(highlighterData.selector);
|
setListSelector(highlighterData.selector);
|
||||||
|
notify(`info`, `List selected succesfully. Select the text data for extraction.`)
|
||||||
setCurrentListId(Date.now());
|
setCurrentListId(Date.now());
|
||||||
setFields({});
|
setFields({});
|
||||||
} else if (getList === true && listSelector && currentListId) {
|
} else if (getList === true && listSelector && currentListId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user