forked from binary-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* carol/ P2P: 2FA (binary-com#6009) * add: icons * add: one more icon * add email verification modal * add invalid verification link modal * add email verified * add email blocked modal * add email blocked modal * use align prop instead * carol/ P2P: Email verification for orders (binary-com#6299) * fix: quotes * add: email verification * cleanup * don't kill me * add response checks * add comment * add: amount + currency * fixed loading of order details and chat * fixed design on responsive * fixed verification modal in responsive * show modal if error * fix * fixed truncated modal in ios * fix time * fix invalid verification modal * fix * fix * fixed verification modal in desktop * fix responsive +logged out user * fix: design for seller * the solution to all my problems * fix: modal * fix logout + modal * hide extra modal * i got 99 problems and 2fa is all of em * fix * fix * fix: amount * fix: amount * fix: add modal * fix: rating modal Co-authored-by: Farrah Mae Ochoa <farrah@deriv.com> Co-authored-by: Nijil Nirmal <nijil@deriv.com> Co-authored-by: Farrah Mae Ochoa <farrah@deriv.com>
- Loading branch information
1 parent
451abb4
commit b142e79
Showing
35 changed files
with
769 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/components/src/components/icon/common/ic-email-sent-p2p.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
...es/components/src/components/icon/common/ic-email-verification-link-blocked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
...es/components/src/components/icon/common/ic-email-verification-link-invalid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
...ages/components/src/components/icon/common/ic-email-verification-link-valid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
packages/p2p/src/components/email-link-blocked-modal/email-link-blocked-modal.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Icon, Modal, Text } from '@deriv/components'; | ||
import { Localize } from 'Components/i18next'; | ||
|
||
const EmailLinkBlockedModal = ({ | ||
// TODO: Uncomment when time is available in BE response | ||
// blocked_for_minutes, | ||
email_link_blocked_modal_error_message, | ||
is_email_link_blocked_modal_open, | ||
setIsEmailLinkBlockedModalOpen, | ||
}) => { | ||
return ( | ||
<Modal | ||
has_close_icon | ||
is_open={is_email_link_blocked_modal_open} | ||
renderTitle={() => <></>} | ||
toggleModal={() => setIsEmailLinkBlockedModalOpen(false)} | ||
width='440px' | ||
> | ||
<Modal.Body className='email-link-blocked-modal'> | ||
<Icon icon='IcEmailVerificationLinkBlocked' size='128' /> | ||
<Text className='email-link-blocked-modal--text' color='prominent' size='s' weight='bold'> | ||
<Localize i18n_default_text='Too many failed attempts' /> | ||
</Text> | ||
<Text align='center' color='prominent' size='s'> | ||
{email_link_blocked_modal_error_message} | ||
</Text> | ||
</Modal.Body> | ||
</Modal> | ||
); | ||
}; | ||
|
||
EmailLinkBlockedModal.propTypes = { | ||
// TODO: Uncomment when time is available in BE response | ||
// blocked_for_minutes: PropTypes.number, | ||
email_link_blocked_modal_error_message: PropTypes.string, | ||
is_email_link_blocked_modal_open: PropTypes.bool, | ||
setIsEmailLinkBlockedModalOpen: PropTypes.func, | ||
}; | ||
|
||
export default EmailLinkBlockedModal; |
9 changes: 9 additions & 0 deletions
9
packages/p2p/src/components/email-link-blocked-modal/email-link-blocked-modal.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.email-link-blocked-modal { | ||
align-items: center; | ||
display: flex; | ||
flex-direction: column; | ||
|
||
&--text { | ||
margin: 2.4rem 0; | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/p2p/src/components/email-link-blocked-modal/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import EmailLinkBlockedModal from './email-link-blocked-modal.jsx'; | ||
import './email-link-blocked-modal.scss'; | ||
|
||
export default EmailLinkBlockedModal; |
57 changes: 57 additions & 0 deletions
57
packages/p2p/src/components/email-link-verified-modal/email-link-verified-modal.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Button, Icon, Modal, Text } from '@deriv/components'; | ||
import { Localize } from 'Components/i18next'; | ||
|
||
const EmailLinkVerifiedModal = ({ | ||
amount, | ||
currency, | ||
is_email_link_verified_modal_open, | ||
onClickConfirm, | ||
setIsEmailLinkVerifiedModalOpen, | ||
}) => { | ||
return ( | ||
<Modal | ||
has_close_icon | ||
is_open={is_email_link_verified_modal_open} | ||
renderTitle={() => <></>} | ||
toggleModal={() => setIsEmailLinkVerifiedModalOpen(false)} | ||
width='440px' | ||
> | ||
<Modal.Body className='email-verified-modal'> | ||
<Icon icon='IcEmailVerificationLinkValid' size='128' /> | ||
<Text className='email-verified-modal--text' color='prominent' size='s' weight='bold'> | ||
<Localize i18n_default_text="We've verified your order" /> | ||
</Text> | ||
<Text align='center' color='prominent' size='s'> | ||
<Localize | ||
i18n_default_text="Please ensure you've received {{amount}} {{currency}} in your account and hit Confirm to complete the transaction." | ||
values={{ amount, currency }} | ||
/> | ||
</Text> | ||
</Modal.Body> | ||
<Modal.Footer className='email-verified-modal--footer'> | ||
<Button | ||
large | ||
primary | ||
onClick={() => { | ||
setIsEmailLinkVerifiedModalOpen(false); | ||
onClickConfirm(); | ||
}} | ||
> | ||
<Localize i18n_default_text='Confirm' /> | ||
</Button> | ||
</Modal.Footer> | ||
</Modal> | ||
); | ||
}; | ||
|
||
EmailLinkVerifiedModal.propTypes = { | ||
amount: PropTypes.string, | ||
currency: PropTypes.string, | ||
is_email_link_verified_modal_open: PropTypes.bool, | ||
onClickConfirm: PropTypes.func, | ||
setIsEmailLinkVerifiedModalOpen: PropTypes.func, | ||
}; | ||
|
||
export default EmailLinkVerifiedModal; |
13 changes: 13 additions & 0 deletions
13
packages/p2p/src/components/email-link-verified-modal/email-link-verified-modal.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.email-verified-modal { | ||
align-items: center; | ||
display: flex; | ||
flex-direction: column; | ||
|
||
&--footer { | ||
align-self: center; | ||
} | ||
|
||
&--text { | ||
margin: 2.4rem 0; | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/p2p/src/components/email-link-verified-modal/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import EmailLinkVerifiedModal from './email-link-verified-modal.jsx'; | ||
import './email-link-verified-modal.scss'; | ||
|
||
export default EmailLinkVerifiedModal; |
Oops, something went wrong.