Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Crowdin #1283

Merged
merged 22 commits into from
Dec 23, 2020
Merged

Crowdin #1283

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crowdin/messages.json

Large diffs are not rendered by default.

56 changes: 38 additions & 18 deletions src/components/custom/_signup-public.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const Wrapper = styled.div`
width: 100%;
overflow: hidden;
border-top: 1px solid rgba(151, 151, 151, 0.2);
border-bottom: 1px solid rgba(151, 151, 151, 0.2);
@media (max-width: 991px) {
flex-direction: column;
height: auto;
Expand Down Expand Up @@ -97,14 +98,18 @@ const InputGroup = styled.div`
margin-top: 3.5rem;
`
const EmailButton = styled(Button)`
margin-left: 2rem;
height: 4rem;
margin-left: 1rem;
min-width: 105px;
height: 40px;
padding: 10px 28px;
border-radius: 4px;
@media ${device.tabletL} {
width: auto;
padding: 10px;
min-width: unset;
font-size: 1.4rem;
margin-left: 0;
height: 5rem;
min-width: 15rem;
height: 40px;
width: 81px;
}
`
const SocialWrapper = styled(Flex)`
Expand All @@ -117,14 +122,17 @@ const SocialWrapper = styled(Flex)`
}
`
const SocialButton = styled(Button)`
width: 56px;
width: 70px;
border-radius: 4px;
justify-content: center;
display: flex;
background-color: var(--color-white);
border: solid 1px var(--color-grey-7);
height: 4rem;
margin: 0 0.8rem;
@media ${device.tabletL} {
width: 114px;
height: 48px;
justify-content: center;
align-items: center;
}
Expand Down Expand Up @@ -155,10 +163,17 @@ const StyledText = styled(Text)`
width: auto;
margin-right: 2rem;
@media ${device.tabletL} {
width: max-content-fit;
margin-right: 1rem;
width: 90px;
margin-right: 0;
}
`

const StyledSpan = styled.span`
font-size: 13px;
font-weight: 500;
color: var(--color-grey-32);
margin-left: 4px;
`
const ImageWrapper = styled(Flex)`
position: relative;
width: 41.1rem;
Expand Down Expand Up @@ -262,10 +277,12 @@ const SignupPublic = ({
value={email}
background="white"
tabletBackground="green-1"
inputColor="var(grey-5)"
inputColor="grey-5"
inputBackground="grey-8"
labelFocusColor="grey-7"
labelColor="black-3"
labelSize="16px"
labelTop="1.2rem"
label={localize('Email')}
placeholder={'[email protected]'}
handleError={clearEmail}
Expand All @@ -275,6 +292,7 @@ const SignupPublic = ({
autoComplete="off"
required
border="unset"
height="40px"
focusBorder="var(--color-grey-7)"
/>
</InputWrapper>
Expand All @@ -288,7 +306,7 @@ const SignupPublic = ({
</EmailButton>
</InputGroup>
<SocialWrapper jc="unset" ai="center">
<StyledText>{localize('or sign up with')}</StyledText>
<StyledText>{localize('Or sign in with')}</StyledText>
<SocialButton
onClick={handleSocialSignup}
provider="facebook"
Expand Down Expand Up @@ -353,7 +371,7 @@ const SignupPublic = ({
value={email}
background="white"
tabletBackground="green-1"
inputColor="var(grey-5)"
inputColor="grey-5"
inputBackground="grey-8"
labelFocusColor="grey-7"
labelColor="black-3"
Expand All @@ -379,30 +397,32 @@ const SignupPublic = ({
</EmailButton>
</InputGroup>
<SocialWrapper jc="unset" ai="center">
<StyledText>{localize('or sign up with')}</StyledText>
<StyledText>{localize('Or sign in with')}</StyledText>
<SocialButton
onClick={handleSocialSignup}
provider="facebook"
data-provider="facebook"
id="gtm-signup-facebook"
provider="google"
data-provider="google"
id="gtm-signup-google"
type="button"
social
>
<span>
<img src={Facebook} alt="facebook" width="12" height="22" />
</span>
<StyledSpan>Google</StyledSpan>
</SocialButton>
<SocialButton
onClick={handleSocialSignup}
provider="google"
data-provider="google"
id="gtm-signup-google"
provider="facebook"
data-provider="facebook"
id="gtm-signup-facebook"
type="button"
social
>
<span>
<img src={Google} alt="google" width="22" height="23" />
</span>
<StyledSpan>Facebook</StyledSpan>
</SocialButton>
</SocialWrapper>
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/components/custom/_simple-steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,16 @@ const MobileBackgroundPattern = styled.img`
left: 0;
top: 0;
`

const LinkButtonWrapper = styled.div`
margin-top: 4.2rem;
text-align: center;
height: 3rem;

${LinkButton} {
width: 113px;
height: 40px;
border-radius: 4px;
position: relative;
}

Expand Down
7 changes: 7 additions & 0 deletions src/components/custom/other-platforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import Help from 'images/svg/menu/help-center.svg'
import Community from 'images/svg/menu/community.svg'
import Payment from 'images/svg/menu/payment-methods.svg'
import RegulatoryInfo from 'images/svg/menu/regulatory.svg'
import Signals from 'components/svgs/signals'

const MarginDivider = styled(Divider)`
margin: 0 0.8rem;
Expand Down Expand Up @@ -430,6 +431,12 @@ export const NavResources = ({ onClick }) => (
onClick={onClick}
to="/payment-methods/"
/>
<CardLink
icon={() => <Signals dynamic_id="dmt5-signals" />}
title={localize('DMT5 Signals')}
onClick={onClick}
to="/dmt5-trading-signals/#signal-subscriber/"
/>
{/* TODO: add this when blog is ready */}
{/* <CardLink title={localize('Blog')} to="/blog/" /> */}
</Flex>
Expand Down
10 changes: 6 additions & 4 deletions src/components/elements/side-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'
import PropTypes from 'prop-types'
import styled, { css } from 'styled-components'
import { Text, Header } from './typography'
import device, {size} from 'themes/device'
import device, { size } from 'themes/device'
import { getWindowWidth } from 'common/utility'
import { Box } from 'components/containers'
import { Desktop, Mobile } from 'components/containers/show'
Expand Down Expand Up @@ -113,8 +113,9 @@ const Tab = ({ active_tab, label, onClick, text, mobile, font_size }) => {
)
}

const getTabs = (children) => children.map(child => child.props.label)
const findCurrentTab = (children, active_tab) => children.find(child => child.props.label === active_tab)
const getTabs = (children) => children.map((child) => child.props.label)
const findCurrentTab = (children, active_tab) =>
children.find((child) => child.props.label === active_tab)

const SideTab = ({ children, is_sticky, tab_header, font_size }) => {
const [active_tab, setActiveTab] = useTabState(getTabs(children))
Expand Down Expand Up @@ -174,7 +175,8 @@ const SideTab = ({ children, is_sticky, tab_header, font_size }) => {
</Mobile>
</TabList>
<TabContent>
{(!is_menu || getWindowWidth() >= size.tabletL) && children.map((child) => (child.props.label === active_tab ? child : undefined))}
{(!is_menu || getWindowWidth() >= size.tabletL) &&
children.map((child) => (child.props.label === active_tab ? child : undefined))}
</TabContent>
</StyledSideTab>
)
Expand Down
12 changes: 4 additions & 8 deletions src/components/form/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const InputWrapper = styled.div`
width: 100%;
border: ${(props) => props.border || '1px solid var(--color-grey-2)'};
border-radius: 4px;
@media ${device.tabletL} {
height: 5rem;
}
Expand All @@ -39,7 +38,6 @@ const InputWrapper = styled.div`
props.error &&
css`
border-color: var(--color-red-1) !important;
& > label {
color: var(--color-red-1) !important;
}
Expand All @@ -53,7 +51,6 @@ const StyledError = styled.img`
height: 1.6rem;
width: 1.6rem;
cursor: pointer;
@media ${device.tablet} {
right: 2rem;
top: 1.6rem;
Expand All @@ -66,11 +63,11 @@ const StyledInput = styled.input`
color: var(--color-${(props) => props.inputColor || 'black'});
font-size: var(--text-size-xs);
padding: 1rem 1rem 1rem 0.8rem;
height: ${(props) => props.height || '40px'};
width: 100%;
display: block;
border: none;
border-radius: 4px;
@media ${device.tabletL} {
height: 100%;
Expand All @@ -79,7 +76,6 @@ const StyledInput = styled.input`
top: 1.5rem;
}
}
@media ${device.mobileL} {
font-size: 14px;
Expand All @@ -105,7 +101,6 @@ const StyledInput = styled.input`
/* prettier-ignore */
background-color: var(--color-${(props) => props.background || 'grey-1'});
@media ${device.mobileL} {
transform: translate(-0.6rem, -20px) scale(0.7);
}
Expand All @@ -123,11 +118,9 @@ const StyledInput = styled.input`
& ~ label {
transform: translate(-0.6rem, -2rem) scale(0.7);
color: var(--color-black-3);
@media ${device.tabletL} {
top: 9px;
}
/* prettier-ignore */
background-color: var(--color-${(props) => props.background || 'grey-1'});
}
Expand Down Expand Up @@ -157,6 +150,7 @@ const StyledLabel = styled.label`

const Input = ({
label,
height,
border,
focusBorder,
labelHoverColor,
Expand Down Expand Up @@ -185,6 +179,7 @@ const Input = ({
background={background}
maxLength={maxLength}
error={error}
height={height}
{...props}
ref={(ip) => (current_input = ip)}
/>
Expand Down Expand Up @@ -220,6 +215,7 @@ Input.propTypes = {
error: PropTypes.string,
focusBorder: PropTypes.string,
handleError: PropTypes.func,
height: PropTypes.any,
id: PropTypes.string,
label: PropTypes.string,
labelColor: PropTypes.string,
Expand Down
17 changes: 14 additions & 3 deletions src/components/hooks/use-tab-state.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import { useState, useEffect } from 'react'
import { checkElemInArray, getLocationHash, isBrowser, routeBack, scrollTop, setLocationHash } from 'common/utility'
import {
checkElemInArray,
getLocationHash,
isBrowser,
routeBack,
scrollTop,
setLocationHash,
} from 'common/utility'

export const useTabState = (tab_list) => {
const [active_tab, setActiveTab] = useState(getLocationHash() && checkElemInArray(tab_list, getLocationHash()) ? getLocationHash() : tab_list[0])
const [active_tab, setActiveTab] = useState(
getLocationHash() && checkElemInArray(tab_list, getLocationHash())
? getLocationHash()
: tab_list[0],
)

useEffect(() => {
if (!getLocationHash() || !checkElemInArray(tab_list, getLocationHash())) {
Expand All @@ -29,4 +40,4 @@ export const useTabState = (tab_list) => {
}, [getLocationHash()])

return [active_tab, setActiveTab]
}
}
17 changes: 7 additions & 10 deletions src/components/layout/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,13 @@ const Footer = () => {
</Link>
</LinkWrapper>
<LinkWrapper>
<Link to="/partners">
{localize('Partnership programmes')}
<Link to="/why-choose-us">
{localize('Why choose us?')}
</Link>
</LinkWrapper>
<LinkWrapper>
<Link to="/why-choose-us">
{localize('Why choose us?')}
<Link to="/partners">
{localize('Partnership programmes')}
</Link>
</LinkWrapper>
<LinkWrapper>
Expand Down Expand Up @@ -518,7 +518,7 @@ const Footer = () => {
</DisclaimerParagraph>
<DisclaimerParagraph>
<Localize
translate_text="Deriv (MX) Ltd, Millennium House, Level 1, Victoria Road, Douglas IM2 4RW, Isle of Man, is licensed by the Gambling Supervision Commission in the Isle of Man (<0>view licence</0>) and by the UK Gambling Commission for clients in the UK (<1>account no. 39172</1>)."
translate_text="Deriv (MX) Ltd, Millennium House, Level 1, Victoria Road, Douglas IM2 4RW, Isle of Man, is licensed and regulated in Great Britain by the Gambling Commission under <1>account no. 39172</1> and by the Gambling Supervision Commission in the Isle of Man (<0>view licence</0>)."
components={[
<StaticAsset
key={0}
Expand All @@ -538,7 +538,7 @@ const Footer = () => {
</DisclaimerParagraph>
<DisclaimerParagraph>
<Localize
translate_text="Deriv (Europe) Limited, W Business Centre, Level 3, Triq Dun Karm, Birkirkara BKR 9033, Malta, is licensed for synthetic indices by the Malta Gaming Authority (<0>licence no. MGA/B2C/102/2000</0>), by the UK Gambling Commission for clients in the UK (<1>account no. 39495</1>), and by the Revenue Commissioners for clients in Ireland (licence no. 1010285)."
translate_text="Deriv (Europe) Limited, W Business Centre, Level 3, Triq Dun Karm, Birkirkara BKR 9033, Malta, is licensed and regulated for synthetic indices by the Malta Gaming Authority (<0>licence no. MGA/B2C/102/2000</0>), by the Gambling Commission for clients in Great Britain under <1>account no. 39495</1>, and by the Revenue Commissioners for clients in Ireland (licence no. 1010285)."
components={[
<StaticAsset
key={0}
Expand Down Expand Up @@ -631,10 +631,7 @@ const Footer = () => {
</Show.Eu>
<Show.NonEU>
<DisclaimerParagraph no_margin>
<Localize
translate_text="The financial products offered on this website include options and contracts for difference (CFDs) which are considered complex derivatives and may not be suitable for everyone. CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money. The products mentioned here may be affected by changes in currency exchange rates. If you invest in these products, you may lose some or all of your investment, and the value of your investment may fluctuate. You should never invest money that you cannot afford to lose and never trade with borrowed money."
components={[<strong key={0} />]}
/>
<Localize translate_text="The financial products offered on this website include options and contracts for difference (CFDs) which are considered complex derivatives and may not be suitable for everyone. CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money. The products mentioned here may be affected by changes in currency exchange rates. If you invest in these products, you may lose some or all of your investment, and the value of your investment may fluctuate. You should never invest money that you cannot afford to lose and never trade with borrowed money." />
</DisclaimerParagraph>
<DisclaimerParagraph>
<Localize
Expand Down
Loading