Recording deletion warning while runs are active

This commit is contained in:
AmitChauhan63390
2024-11-15 16:16:01 +05:30
parent 04ed79b337
commit 8eedca1b1e
5 changed files with 64 additions and 5 deletions

View File

@@ -36,6 +36,8 @@ const ApiKeyManager = () => {
const [copySuccess, setCopySuccess] = useState<boolean>(false);
const { notify } = useGlobalInfoStore();
useEffect(() => {
const fetchApiKey = async () => {
try {
@@ -56,6 +58,7 @@ const ApiKeyManager = () => {
try {
const { data } = await axios.post(`${apiUrl}/auth/generate-api-key`);
setApiKey(data.api_key);
localStorage.setItem('x-api-key', data.api_key);
notify('success', `Generated API Key successfully`);
} catch (error: any) {
notify('error', `Failed to generate API Key - ${error.message}`);

View File

@@ -8,6 +8,7 @@ import { useActionContext } from '../../context/browserActions';
import { useBrowserSteps, TextStep } from '../../context/browserSteps';
import { useGlobalInfoStore } from '../../context/globalInfo';
interface ElementInfo {
tagName: string;
hasOnlyText?: boolean;
@@ -316,7 +317,7 @@ export const BrowserWindow = () => {
}
}, [paginationMode, resetPaginationSelector]);
return (
<div onClick={handleClick} style={{ width: '900px' }} id="browser-window">
{