feat: add func to check if site needs login
This commit is contained in:
@@ -10,6 +10,8 @@ interface GlobalInfo {
|
|||||||
notification: AlertSnackbarProps;
|
notification: AlertSnackbarProps;
|
||||||
notify: (severity: 'error' | 'warning' | 'info' | 'success', message: string) => void;
|
notify: (severity: 'error' | 'warning' | 'info' | 'success', message: string) => void;
|
||||||
closeNotify: () => void;
|
closeNotify: () => void;
|
||||||
|
isLogin: boolean;
|
||||||
|
setIsLogin: (isLogin: boolean) => void;
|
||||||
recordings: string[];
|
recordings: string[];
|
||||||
setRecordings: (recordings: string[]) => void;
|
setRecordings: (recordings: string[]) => void;
|
||||||
rerenderRuns: boolean;
|
rerenderRuns: boolean;
|
||||||
@@ -53,6 +55,7 @@ class GlobalInfoStore implements Partial<GlobalInfo> {
|
|||||||
recordingName = '';
|
recordingName = '';
|
||||||
initialUrl = 'https://';
|
initialUrl = 'https://';
|
||||||
recordingUrl = 'https://';
|
recordingUrl = 'https://';
|
||||||
|
isLogin = false;
|
||||||
currentWorkflowActionsState = {
|
currentWorkflowActionsState = {
|
||||||
hasScrapeListAction: false,
|
hasScrapeListAction: false,
|
||||||
hasScreenshotAction: false,
|
hasScreenshotAction: false,
|
||||||
@@ -75,6 +78,7 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => {
|
|||||||
const [recordingLength, setRecordingLength] = useState<number>(globalInfoStore.recordingLength);
|
const [recordingLength, setRecordingLength] = useState<number>(globalInfoStore.recordingLength);
|
||||||
const [recordingId, setRecordingId] = useState<string | null>(globalInfoStore.recordingId);
|
const [recordingId, setRecordingId] = useState<string | null>(globalInfoStore.recordingId);
|
||||||
const [recordingName, setRecordingName] = useState<string>(globalInfoStore.recordingName);
|
const [recordingName, setRecordingName] = useState<string>(globalInfoStore.recordingName);
|
||||||
|
const [isLogin, setIsLogin] = useState<boolean>(globalInfoStore.isLogin);
|
||||||
const [initialUrl, setInitialUrl] = useState<string>(globalInfoStore.initialUrl);
|
const [initialUrl, setInitialUrl] = useState<string>(globalInfoStore.initialUrl);
|
||||||
const [recordingUrl, setRecordingUrl] = useState<string>(globalInfoStore.recordingUrl);
|
const [recordingUrl, setRecordingUrl] = useState<string>(globalInfoStore.recordingUrl);
|
||||||
const [currentWorkflowActionsState, setCurrentWorkflowActionsState] = useState(globalInfoStore.currentWorkflowActionsState);
|
const [currentWorkflowActionsState, setCurrentWorkflowActionsState] = useState(globalInfoStore.currentWorkflowActionsState);
|
||||||
@@ -127,6 +131,8 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => {
|
|||||||
setInitialUrl,
|
setInitialUrl,
|
||||||
recordingUrl,
|
recordingUrl,
|
||||||
setRecordingUrl,
|
setRecordingUrl,
|
||||||
|
isLogin,
|
||||||
|
setIsLogin,
|
||||||
currentWorkflowActionsState,
|
currentWorkflowActionsState,
|
||||||
setCurrentWorkflowActionsState,
|
setCurrentWorkflowActionsState,
|
||||||
shouldResetInterpretationLog,
|
shouldResetInterpretationLog,
|
||||||
|
|||||||
Reference in New Issue
Block a user