Browse Source

Merge pull request #1632 from meriadec/lol-links

Add links to Terms + Privacy policy in Onboarding
gre-patch-1
Gaëtan Renaudeau 6 years ago
committed by GitHub
parent
commit
3dcc64bd58
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 36
      src/components/Onboarding/steps/Analytics.js
  2. 2
      src/config/urls.js
  3. 4
      static/i18n/en/app.json

36
src/components/Onboarding/steps/Analytics.js

@ -7,10 +7,13 @@ import { saveSettings } from 'actions/settings'
import Box from 'components/base/Box'
import Switch from 'components/base/Switch'
import FakeLink from 'components/base/FakeLink'
import { Trans } from 'react-i18next'
import TrackPage from 'analytics/TrackPage'
import Track from 'analytics/Track'
import { openModal } from 'reducers/modals'
import { MODAL_SHARE_ANALYTICS, MODAL_TECHNICAL_DATA } from 'config/constants'
import { openURL } from 'helpers/linking'
import { urls } from 'config/urls'
import ShareAnalytics from '../../modals/ShareAnalytics'
import TechnicalData from '../../modals/TechnicalData'
import { Title, Description, FixedTopContainer, StepContainerInner } from '../helperComponents'
@ -46,6 +49,9 @@ class Analytics extends PureComponent<StepProps, State> {
})
}
onClickTerms = () => openURL(urls.terms)
onClickPrivacy = () => openURL(urls.privacyPolicy)
handleNavBack = () => {
const { savePassword, prevStep } = this.props
savePassword(undefined)
@ -157,6 +163,26 @@ class Analytics extends PureComponent<StepProps, State> {
<Switch isChecked={sentryLogsToggle} onChange={this.handleSentryLogsToggle} />
</Box>
</Container>
<Container>
<Box>
<Box mb={1}>
<AnalyticsTitle data-e2e="analytics_terms">
{t('onboarding.analytics.terms.title')}
</AnalyticsTitle>
</Box>
<AnalyticsText>
<div>
<Trans i18nKey="onboarding.analytics.terms.desc">
{'Accept the '}
<HoveredLink onClick={this.onClickTerms}>{'terms of license'}</HoveredLink>
{'and'}
<HoveredLink onClick={this.onClickPrivacy}>{'privacy'}</HoveredLink>
{'.'}
</Trans>
</div>
</AnalyticsText>
</Box>
</Container>
</Box>
</StepContainerInner>
<OnboardingFooter
@ -204,8 +230,16 @@ const Container = styled(Box).attrs({
width: 550px;
justify-content: space-between;
`
const LearnMoreWrapper = styled(Box).attrs({})`
const LearnMoreWrapper = styled(Box)`
${FakeLink}:hover {
color: ${p => p.theme.colors.wallet};
}
`
const HoveredLink = styled.span`
cursor: pointer;
text-decoration: underline;
&:hover {
color: ${p => p.theme.colors.wallet};
}
`

2
src/config/urls.js

@ -16,7 +16,7 @@ export const urls = {
contactSupport: 'https://support.ledgerwallet.com/hc/en-us/requests/new?ticket_form_id=248165',
feesMoreInfo: 'https://support.ledgerwallet.com/hc/en-us/articles/360006535873',
recipientAddressInfo: 'https://support.ledgerwallet.com/hc/en-us/articles/360006433934',
privacyPolicy: 'https://www.ledgerwallet.com/privacy-policy',
privacyPolicy: 'https://www.ledgerwallet.com/pages/privacy-policy',
githubIssues:
'https://github.com/LedgerHQ/ledger-live-desktop/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Acomments-desc',

4
static/i18n/en/app.json

@ -677,6 +677,10 @@
"item4": "Application language or region",
"item5": "OS language or region"
}
},
"terms": {
"title": "Terms *",
"desc": "By continuing, you acknowledge that you have read and agree to the <1>Terms of Use</1> and <3>Privacy Policy</3>."
}
},
"finish": {

Loading…
Cancel
Save