diff --git a/.env b/.env index 68d52a2..d3718d6 100644 --- a/.env +++ b/.env @@ -4,7 +4,7 @@ VITE_REFRESH_TOKEN_NAME = 'dmail_refresh_token' VITE_DANAK_BASE_URL ='https://api.danakcorp.com' VITE_SOCKET_URL = 'wss://dmail-api.danakcorp.com/email' -# VITE_SOCKET_URL = 'ws://192.168.1.118:4000/email' +# VITE_SOCKET_URL = 'ws://192.168.1.106:4000/email' VITE_BASE_URL = 'https://dmail-api.danakcorp.com' # VITE_BASE_URL = 'http://192.168.1.106:4000' diff --git a/src/components/Table.tsx b/src/components/Table.tsx index d6d220d..405ae38 100644 --- a/src/components/Table.tsx +++ b/src/components/Table.tsx @@ -261,8 +261,8 @@ const Table = ({ if (data.length === 0) { return ( - - no data + + no data
{noDataMessage}
diff --git a/src/pages/Trash/List.tsx b/src/pages/Trash/List.tsx index 35ded80..e16dca0 100644 --- a/src/pages/Trash/List.tsx +++ b/src/pages/Trash/List.tsx @@ -3,12 +3,11 @@ import { FC, useState } from 'react' import Table from '../../components/Table'; import { ColumnType } from '../../components/types/TableTypes'; import { InfoCircle, Refresh2, Trash, RecoveryConvert } from 'iconsax-react'; -import { RowActionItem } from '../../components/RowActionsDropdown'; +import RowActionsDropdown, { RowActionItem } from '../../components/RowActionsDropdown'; import { useNavigate } from 'react-router-dom'; import { useEmptyTrash, useGetTrashMessages } from './hooks/useTrashData'; import { TrashMessage } from './types/TrashTypes'; import { useEmailActions } from '@/hooks/useEmailActions'; -import Button from '@/components/Button'; import ModalConfrim from '@/components/ModalConfrim'; import { ErrorType } from '@/helpers/types'; import { toast } from '@/components/Toast'; @@ -146,6 +145,13 @@ const List: FC = () => { className={`cursor-pointer min-w-[18px] ${isFetching ? 'animate-spin-reverse' : ''}`} onClick={() => refetch()} /> + , + onClick: () => setShowModal(true) + } + ]} /> ); @@ -225,16 +231,6 @@ const List: FC = () => {

سطل زباله

-
{
پیش نویس - + {formatTime(item.date)}
diff --git a/src/pages/received/List.tsx b/src/pages/received/List.tsx index 103c133..ab4e2f1 100644 --- a/src/pages/received/List.tsx +++ b/src/pages/received/List.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next' import Table from '../../components/Table'; import { ColumnType } from '../../components/types/TableTypes'; import { InfoCircle, Refresh2, Trash, ArchiveTick, Star1 } from 'iconsax-react'; -import { RowActionItem } from '../../components/RowActionsDropdown'; +import RowActionsDropdown, { RowActionItem } from '../../components/RowActionsDropdown'; import { useNavigate } from 'react-router-dom'; import { useGetInbox, useMarkAllRead, useSummarizeEmail } from './hooks/useEmailData'; import { InboxMessage } from './types/Types'; @@ -15,7 +15,6 @@ import Favorite from './Components/Favorite'; import Summerize from './Components/Summerize'; import Intelligense from '@/assets/images/intelligense.svg' import SummarizeModal from './Components/SummarizeModal'; -import Button from '@/components/Button'; import ModalConfrim from '@/components/ModalConfrim'; import { ErrorType } from '@/helpers/types'; import { toast } from '@/components/Toast'; @@ -108,17 +107,17 @@ const List: FC = () => { {item.from.name || item.from.address} - + {formatTime(item.date)}
- {item.subject || 'بدون موضوع'} + {item.subject}
- {item.intro || 'بدون متن پیش‌نمایش'} + {item.intro}
) @@ -164,6 +163,17 @@ const List: FC = () => { className={`cursor-pointer min-w-[18px] ${isFetching ? 'animate-spin-reverse' : ''}`} onClick={() => refetch()} /> + + , + onClick: () => handleMarkAll() + } + ]} /> + + + ); @@ -293,19 +303,6 @@ const List: FC = () => {

{t('received.title')}

-
{ className={`cursor-pointer min-w-[18px] ${isFetching ? 'animate-spin-reverse' : ''}`} onClick={() => refetch()} /> + , + onClick: () => setShowModal(true) + } + ]} />
); @@ -220,16 +226,6 @@ const List: FC = () => {

هرزنامه ها

-