diff --git a/index.html b/index.html index 3765ec0..105705e 100644 --- a/index.html +++ b/index.html @@ -29,7 +29,8 @@ 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-P7KSD4T'); - + +
+ Interested by Confidential Messaging? +
+ Your message has been successfully sent +
+ Your message has been sent to: {lastRecipient} +
+ Are you looking for Privacy Preserving Communication ? + + Explore the possibilities to integrate Confidential Web3 Messaging. +
+ Protected data stored either on IPFS or Arweave +
void; + isMessageSend: boolean; + setIsMessageSend: (param: boolean) => void; +}; + +export const useSendMessageStore = create((set) => ({ + lastRecipient: '', + setLastRecipient: (sendMessage: string) => + set({ lastRecipient: sendMessage }), + isMessageSend: false, + setIsMessageSend: (isMessageSend: boolean) => + set({ isMessageSend: isMessageSend }), +})); diff --git a/src/views/contact/contactList.tsx b/src/views/contact/contactList.tsx index 4ee3be5..ffe88c6 100644 --- a/src/views/contact/contactList.tsx +++ b/src/views/contact/contactList.tsx @@ -18,6 +18,7 @@ import { getWeb3mailClient, getWeb3telegramClient, } from '@/externals/iexecSdkClient'; +import DialogSendMessageConfirmation from '@/modules/myData/DialogSendMessageConfirmation'; import useUserStore from '@/stores/useUser.store'; import { chunkArray } from '@/utils/chunkArray'; import { cn } from '@/utils/style.utils'; @@ -151,6 +152,7 @@ export default function ContactList() { return ( + Send Message to contact Email or telegram that people have authorized you to access diff --git a/src/views/contact/sendMessage.tsx b/src/views/contact/sendMessage.tsx index 7435b94..b0f282d 100644 --- a/src/views/contact/sendMessage.tsx +++ b/src/views/contact/sendMessage.tsx @@ -22,10 +22,12 @@ import { getWeb3mailClient, getWeb3telegramClient, } from '@/externals/iexecSdkClient'; +import { useSendMessageStore } from '@/stores/useSendMessage.store'; import { pluralize } from '@/utils/pluralize'; export default function SendMessage() { const navigate = useNavigate(); + const { setLastRecipient, setIsMessageSend } = useSendMessageStore(); const { protectedDataAddress } = useParams<{ protectedDataAddress: Address; }>(); @@ -127,15 +129,9 @@ export default function SendMessage() { console.error(err); }, onSuccess: () => { + setLastRecipient(protectedDataAddress!); + setIsMessageSend(protectedDataAddress!); navigate('/contacts'); - toast({ - title: `You have successfully sent a ${ - protectedData.data?.schema - ? getDataType(protectedData.data.schema) - : 'unknown' - }.`, - variant: 'success', - }); }, }); diff --git a/src/views/myData/protectedData.tsx b/src/views/myData/protectedData.tsx index 8a0d59a..cf8e33c 100644 --- a/src/views/myData/protectedData.tsx +++ b/src/views/myData/protectedData.tsx @@ -130,7 +130,7 @@ export default function ProtectedData() { Authorized users - These are the users who you allowed to access this protected data. + These are the users you allowed to access this protected data.
Email or telegram that people have authorized you to access
- These are the users who you allowed to access this protected data. + These are the users you allowed to access this protected data.