From 3c275dbcddb47ce8abec25abdf67abb2a642d394 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Sun, 27 Jul 2025 14:44:51 +0330 Subject: [PATCH] mark all as read + spam empty --- .env | 2 +- src/components/ModalConfrim.tsx | 69 +++++++++++++++++ src/langs/fa.json | 9 ++- src/pages/Trash/List.tsx | 43 ++++++++--- src/pages/Trash/hooks/useTrashData.tsx | 10 ++- src/pages/Trash/service/TrashService.ts | 9 +++ src/pages/received/List.tsx | 37 ++++++++- src/pages/received/hooks/useEmailData.tsx | 6 ++ src/pages/received/service/EmailService.ts | 9 +++ src/pages/spam/List.tsx | 38 ++++++++- src/pages/spam/hooks/useSpamData.tsx | 10 ++- src/pages/spam/service/SpamService.ts | 9 +++ vite.config.ts | 90 +++++++++++----------- 13 files changed, 274 insertions(+), 67 deletions(-) create mode 100644 src/components/ModalConfrim.tsx diff --git a/.env b/.env index 1f2fb8d..68d52a2 100644 --- a/.env +++ b/.env @@ -7,7 +7,7 @@ VITE_SOCKET_URL = 'wss://dmail-api.danakcorp.com/email' # VITE_SOCKET_URL = 'ws://192.168.1.118:4000/email' VITE_BASE_URL = 'https://dmail-api.danakcorp.com' -# VITE_BASE_URL = 'http://192.168.1.101:4000' +# VITE_BASE_URL = 'http://192.168.1.106:4000' VITE_SERVICE_ID = 'e51afdc3-ea0b-49cf-8f49-2a6f131b024e' diff --git a/src/components/ModalConfrim.tsx b/src/components/ModalConfrim.tsx new file mode 100644 index 0000000..f82ad46 --- /dev/null +++ b/src/components/ModalConfrim.tsx @@ -0,0 +1,69 @@ +import { FC, useState } from 'react' +import DefaulModal from './DefaulModal' +import { useTranslation } from 'react-i18next' +import Button from './Button' +import Textarea from './Textarea' + +type Props = { + isLoading?: boolean, + close: () => void, + isOpen: boolean, + onConfrim: (text?: string) => void, + label?: string, + isHasDescription?: boolean, + title?: string +} + +const ModalConfrim: FC = (props: Props) => { + + const { t } = useTranslation('global') + const [description, setDescription] = useState('') + + return ( + +
+
+ { + props.label ? + props.label + : + t('confrim.content') + } + + { + props.isHasDescription && +
+