-
Notifications
You must be signed in to change notification settings - Fork 8
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:deriv-com/p2p into shayan/feq-222…
…6/implement-header-component
- Loading branch information
Showing
29 changed files
with
464 additions
and
15,537 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { LegacyAccountLimitsIcon } from '@deriv/quill-icons'; | ||
import { useTranslations } from '@deriv-com/translations'; | ||
import { TooltipMenuIcon } from '@deriv-com/ui'; | ||
|
||
const AccountLimits = () => { | ||
const { localize } = useTranslations(); | ||
|
||
return ( | ||
<TooltipMenuIcon | ||
as='a' | ||
className='app-footer__icon' | ||
href='https://app.deriv.com/account/account-limits' | ||
tooltipContent={localize('Account limits')} | ||
> | ||
<LegacyAccountLimitsIcon iconSize='xs' /> | ||
</TooltipMenuIcon> | ||
); | ||
}; | ||
|
||
export default AccountLimits; |
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 |
---|---|---|
@@ -1,13 +1,47 @@ | ||
.app-footer { | ||
padding: 2.4rem; | ||
height: 3.2rem; | ||
display: flex; | ||
flex-direction: row-reverse; | ||
align-items: center; | ||
position: fixed; | ||
bottom: 0; | ||
right: 0; | ||
left: 0; | ||
border-top: 1px solid #f2f3f4; | ||
box-shadow: 0px 1px 0px 0px #f2f3f4 inset; | ||
background: #fff; | ||
|
||
&__language-btn { | ||
&:hover { | ||
background-color: transparent !important; | ||
&__icon { | ||
padding: 0.8rem; | ||
} | ||
|
||
&__vertical-line { | ||
width: 0.1rem; | ||
height: 1.6rem; | ||
background-color: #f2f3f4; | ||
margin: 0 0.8rem; | ||
} | ||
|
||
&__language { | ||
display: flex; | ||
align-items: center; | ||
padding: 0.8rem; | ||
|
||
span { | ||
color: #000 !important; | ||
} | ||
& span { | ||
margin-left: 0.4rem; | ||
} | ||
} | ||
|
||
&__network-status { | ||
width: 0.8rem; | ||
height: 0.8rem; | ||
border-radius: 100%; | ||
background-color: #4bb4b3; | ||
margin-left: 2rem; | ||
} | ||
|
||
&__endpoint { | ||
color: #377cfc; | ||
text-decoration: underline; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { LegacySettings1pxIcon } from '@deriv/quill-icons'; | ||
import { useTranslations } from '@deriv-com/translations'; | ||
import { TooltipMenuIcon } from '@deriv-com/ui'; | ||
|
||
const ChangeTheme = () => { | ||
const { localize } = useTranslations(); | ||
|
||
return ( | ||
<TooltipMenuIcon as='button' className='app-footer__icon' tooltipContent={localize('Change theme')}> | ||
<LegacySettings1pxIcon iconSize='xs' /> | ||
</TooltipMenuIcon> | ||
); | ||
}; | ||
|
||
export default ChangeTheme; |
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,21 @@ | ||
import { LegacyDerivIcon } from '@deriv/quill-icons'; | ||
import { useTranslations } from '@deriv-com/translations'; | ||
import { TooltipMenuIcon } from '@deriv-com/ui'; | ||
|
||
const Deriv = () => { | ||
const { localize } = useTranslations(); | ||
|
||
return ( | ||
<TooltipMenuIcon | ||
as='a' | ||
className='app-footer__icon' | ||
href='https://deriv.com/' | ||
target='_blank' | ||
tooltipContent={localize('Go to deriv.com')} | ||
> | ||
<LegacyDerivIcon iconSize='xs' /> | ||
</TooltipMenuIcon> | ||
); | ||
}; | ||
|
||
export default Deriv; |
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,21 @@ | ||
import { Link } from 'react-router-dom'; | ||
import { Text } from '@deriv-com/ui'; | ||
|
||
const Endpoint = () => { | ||
const serverURL = localStorage.getItem('config.server_url'); | ||
|
||
if (serverURL) { | ||
return ( | ||
<Text color='red' size='sm'> | ||
The server{' '} | ||
<Link className='app-footer__endpoint' to='/endpoint'> | ||
endpoint | ||
</Link>{' '} | ||
{`is: ${serverURL}`} | ||
</Text> | ||
); | ||
} | ||
return null; | ||
}; | ||
|
||
export default Endpoint; |
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,22 @@ | ||
import { useFullScreen } from '@/hooks'; | ||
import { LegacyFullscreen1pxIcon } from '@deriv/quill-icons'; | ||
import { useTranslations } from '@deriv-com/translations'; | ||
import { TooltipMenuIcon } from '@deriv-com/ui'; | ||
|
||
const FullScreen = () => { | ||
const { toggleFullScreenMode } = useFullScreen(); | ||
const { localize } = useTranslations(); | ||
|
||
return ( | ||
<TooltipMenuIcon | ||
as='button' | ||
className='app-footer__icon' | ||
onClick={toggleFullScreenMode} | ||
tooltipContent={localize('Full screen')} | ||
> | ||
<LegacyFullscreen1pxIcon iconSize='xs' /> | ||
</TooltipMenuIcon> | ||
); | ||
}; | ||
|
||
export default FullScreen; |
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,21 @@ | ||
import { LegacyHelpCentreIcon } from '@deriv/quill-icons'; | ||
import { useTranslations } from '@deriv-com/translations'; | ||
import { TooltipMenuIcon } from '@deriv-com/ui'; | ||
|
||
const HelpCentre = () => { | ||
const { localize } = useTranslations(); | ||
|
||
return ( | ||
<TooltipMenuIcon | ||
as='a' | ||
className='app-footer__icon' | ||
href='https://deriv.com/help-centre/' | ||
target='_blank' | ||
tooltipContent={localize('Help centre')} | ||
> | ||
<LegacyHelpCentreIcon iconSize='xs' /> | ||
</TooltipMenuIcon> | ||
); | ||
}; | ||
|
||
export default HelpCentre; |
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,30 @@ | ||
import { LANGUAGES } from '@/constants'; | ||
import { useTranslations } from '@deriv-com/translations'; | ||
import { Text, TooltipMenuIcon } from '@deriv-com/ui'; | ||
import './AppFooter.scss'; | ||
|
||
type TLanguageSettings = { | ||
openLanguageSettingModal: () => void; | ||
}; | ||
|
||
const LanguageSettings = ({ openLanguageSettingModal }: TLanguageSettings) => { | ||
const { currentLang, localize } = useTranslations(); | ||
|
||
const countryIcon = LANGUAGES.find(({ code }) => code == currentLang)?.icon; | ||
|
||
return ( | ||
<TooltipMenuIcon | ||
as='button' | ||
className='app-footer__language' | ||
onClick={openLanguageSettingModal} | ||
tooltipContent={localize('Language')} | ||
> | ||
{countryIcon} | ||
<Text size='xs' weight='bold'> | ||
{currentLang} | ||
</Text> | ||
</TooltipMenuIcon> | ||
); | ||
}; | ||
|
||
export default LanguageSettings; |
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,15 @@ | ||
import { LegacyLiveChatOutlineIcon } from '@deriv/quill-icons'; | ||
import { useTranslations } from '@deriv-com/translations'; | ||
import { TooltipMenuIcon } from '@deriv-com/ui'; | ||
|
||
const Livechat = () => { | ||
const { localize } = useTranslations(); | ||
|
||
return ( | ||
<TooltipMenuIcon as='button' className='app-footer__icon' tooltipContent={localize('Live chat')}> | ||
<LegacyLiveChatOutlineIcon iconSize='xs' /> | ||
</TooltipMenuIcon> | ||
); | ||
}; | ||
|
||
export default Livechat; |
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,17 @@ | ||
import { useTranslations } from '@deriv-com/translations'; | ||
import { TooltipMenuIcon } from '@deriv-com/ui'; | ||
|
||
export const NetworkStatus = () => { | ||
const { localize } = useTranslations(); | ||
|
||
return ( | ||
<TooltipMenuIcon | ||
as='div' | ||
className='app-footer__icon' | ||
disableHover | ||
tooltipContent={localize('Network status: Online')} | ||
> | ||
<div className='app-footer__network-status' /> | ||
</TooltipMenuIcon> | ||
); | ||
}; |
Oops, something went wrong.