-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:binary-com/deriv-app into Jim/WEB…
…REL-890/p2p-chat-messages-are-disappearing-when-shifting-the-tabs-and-chat-page-is-breaking
- Loading branch information
Showing
33 changed files
with
724 additions
and
372 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
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
4 changes: 4 additions & 0 deletions
4
packages/core/src/App/Containers/Modals/mt5-notification/index.ts
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 MT5Notification from './mt5-notification'; | ||
import './mt5-notification.scss'; | ||
|
||
export default MT5Notification; |
62 changes: 62 additions & 0 deletions
62
packages/core/src/App/Containers/Modals/mt5-notification/mt5-notification-description.tsx
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,62 @@ | ||
import React from 'react'; | ||
import { Text } from '@deriv/components'; | ||
import { Localize } from '@deriv/translations'; | ||
|
||
const MT5NotificationDescription = () => { | ||
return ( | ||
<div className={'mt5-notification-modal-description'}> | ||
<Text as='p' size='xs'> | ||
<Localize i18n_default_text='Follow these simple steps to fix it:' /> | ||
</Text> | ||
<ol className='mt5-notification-list-container'> | ||
<li className='mt5-notification-list-container-item'> | ||
<Text as='p' size='xs'> | ||
<Localize i18n_default_text='On your MT5 mobile app, delete your existing Deriv account:' /> | ||
</Text> | ||
<ul> | ||
<li className='mt5-notification-list'> | ||
<Text as='p' size='xs'> | ||
<Localize | ||
i18n_default_text='- iOS: Swipe left on the account and tap <0>Delete</0>.' | ||
components={[<strong key={0} />]} | ||
/> | ||
</Text> | ||
</li> | ||
<li className='mt5-notification-list'> | ||
<Text as='p' size='xs'> | ||
<Localize | ||
i18n_default_text='- Android: Tap the account, open <0>Options</0>, and tap <0>Delete</0>.' | ||
components={[<strong key={0} />]} | ||
/> | ||
</Text> | ||
</li> | ||
</ul> | ||
</li> | ||
<li className='mt5-notification-list-container-item'> | ||
<Text as='p' size='xs'> | ||
<Localize | ||
i18n_default_text='Search for the broker <0>Deriv Holdings (Guernsey) Limited</0> and select it.' | ||
components={[<strong key={0} />]} | ||
/> | ||
</Text> | ||
</li> | ||
<li className='mt5-notification-list-container-item'> | ||
<Text as='p' size='xs'> | ||
<Localize i18n_default_text='Re-add your MT5 account using the same log in credentials.' /> | ||
</Text> | ||
</li> | ||
</ol> | ||
<Text as='p' size='xs'> | ||
<Localize | ||
i18n_default_text='If this doesn’t work, uninstall and re-install the MT5 app. Then redo steps <0>2</0> and <0>3</0>.' | ||
components={[<strong key={0} />]} | ||
/> | ||
</Text> | ||
<Text as='p' size='xs' className='mt5-notification-list-contact'> | ||
<Localize i18n_default_text='Need more help? Contact us through live chat for assistance.' /> | ||
</Text> | ||
</div> | ||
); | ||
}; | ||
|
||
export default MT5NotificationDescription; |
32 changes: 32 additions & 0 deletions
32
packages/core/src/App/Containers/Modals/mt5-notification/mt5-notification.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,32 @@ | ||
.mt5-notification-modal { | ||
&-body { | ||
border-top: 2px solid #f2f3f4; | ||
} | ||
@include mobile { | ||
&-description { | ||
margin: 2rem; | ||
&--button { | ||
display: flex; | ||
width: 100%; | ||
} | ||
&--footer { | ||
padding: 1rem 1.6rem; | ||
} | ||
} | ||
} | ||
} | ||
.mt5-notification-list { | ||
list-style: none; | ||
&-container { | ||
list-style: auto; | ||
padding: 1.5rem; | ||
font-size: 1.6rem; | ||
color: var(--text-general); | ||
&-item { | ||
list-style: decimal; | ||
} | ||
} | ||
&-contact { | ||
margin-top: 1rem; | ||
} | ||
} |
71 changes: 71 additions & 0 deletions
71
packages/core/src/App/Containers/Modals/mt5-notification/mt5-notification.tsx
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,71 @@ | ||
import React from 'react'; | ||
import { observer, useStore } from '@deriv/stores'; | ||
import { Modal, DesktopWrapper, MobileDialog, MobileWrapper, UILoader, Button } from '@deriv/components'; | ||
import { localize } from '@deriv/translations'; | ||
import MT5NotificationDescription from './mt5-notification-description'; | ||
|
||
const MT5Notification = observer(() => { | ||
const { traders_hub } = useStore(); | ||
const { setMT5NotificationModal, is_mt5_notificaiton_modal_visible } = traders_hub; | ||
const clickHandler = () => { | ||
setMT5NotificationModal(!is_mt5_notificaiton_modal_visible); | ||
}; | ||
|
||
return ( | ||
<React.Suspense fallback={<UILoader />}> | ||
<DesktopWrapper> | ||
<Modal | ||
has_close_icon={false} | ||
is_open={is_mt5_notificaiton_modal_visible} | ||
title={localize('Trouble accessing Deriv MT5 on your mobile?')} | ||
toggleModal={clickHandler} | ||
className='mt5-notification-modal' | ||
height='455px' | ||
width='510px' | ||
> | ||
<Modal.Body className='mt5-notification-modal-body'> | ||
<MT5NotificationDescription /> | ||
</Modal.Body> | ||
<Modal.Footer has_separator> | ||
<Button | ||
primary | ||
onClick={() => { | ||
setMT5NotificationModal(false); | ||
}} | ||
> | ||
{localize('OK')} | ||
</Button> | ||
</Modal.Footer> | ||
</Modal> | ||
</DesktopWrapper> | ||
<MobileWrapper> | ||
<MobileDialog | ||
portal_element_id='modal_root' | ||
wrapper_classname='mt5-notification-modal-description' | ||
title={localize('Trouble accessing Deriv MT5 on your mobile?')} | ||
visible={is_mt5_notificaiton_modal_visible} | ||
onClose={() => { | ||
setMT5NotificationModal(false); | ||
}} | ||
has_full_height | ||
has_close_icon={false} | ||
footer={ | ||
<div className='mt5-notification-modal-description--footer'> | ||
<Button | ||
className='mt5-notification-modal-description--button' | ||
primary | ||
onClick={() => setMT5NotificationModal(false)} | ||
> | ||
{localize('OK')} | ||
</Button> | ||
</div> | ||
} | ||
> | ||
<MT5NotificationDescription /> | ||
</MobileDialog> | ||
</MobileWrapper> | ||
</React.Suspense> | ||
); | ||
}); | ||
|
||
export default MT5Notification; |
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.