Merge branch 'main' into fix/minor-bugs

This commit is contained in:
Siddhant Rai
2025-02-19 14:16:56 +05:30
committed by GitHub
21 changed files with 427 additions and 333 deletions

View File

@@ -2,12 +2,12 @@ import React, { useRef } from 'react';
import { useTranslation } from 'react-i18next';
import userService from '../api/services/userService';
import Exit from '../assets/exit.svg';
import { useOutsideAlerter } from '../hooks';
import { ActiveState } from '../models/misc';
import ConfigToolModal from './ConfigToolModal';
import { AvailableToolType } from './types';
import Spinner from '../components/Spinner';
import WrapperComponent from './WrapperModal';
export default function AddToolModal({
message,
@@ -91,28 +91,12 @@ export default function AddToolModal({
}, [modalState]);
return (
<>
<div
className={`${
modalState === 'ACTIVE' ? 'visible' : 'hidden'
} fixed top-0 left-0 z-30 h-screen w-screen bg-gray-alpha flex items-center justify-center`}
>
<article
ref={modalRef}
className="flex h-[85vh] w-[90vw] md:w-[75vw] flex-col gap-4 rounded-2xl bg-[#FBFBFB] shadow-lg dark:bg-[#26272E]"
{modalState === 'ACTIVE' && (
<WrapperComponent
close={() => setModalState('INACTIVE')}
className="h-[85vh] w-[90vw] md:w-[75vw]"
>
<div className="relative">
<button
className="absolute top-3 right-4 m-2 w-3"
onClick={() => {
setModalState('INACTIVE');
}}
>
<img
className="filter dark:invert"
src={Exit}
alt={t('cancel')}
/>
</button>
<div className="flex flex-col gap-4 h-full">
<div className="p-6">
<h2 className="font-semibold text-xl text-jet dark:text-bright-gray px-3">
{t('settings.tools.selectToolSetup')}
@@ -165,8 +149,8 @@ export default function AddToolModal({
</div>
</div>
</div>
</article>
</div>
</WrapperComponent>
)}
<ConfigToolModal
modalState={configModalState}
setModalState={setConfigModalState}