From 7387fea8ec2611c6faebd0572802d5d31ddac545 Mon Sep 17 00:00:00 2001 From: Anastasia Poupeney Date: Wed, 4 Jul 2018 16:03:01 +0200 Subject: [PATCH 1/4] manager need help link --- src/components/ManagerPage/Dashboard.js | 37 ++++++++++++++++++++++--- src/components/ManagerPage/index.js | 15 +++++++++- src/config/support.js | 1 + static/i18n/en/app.yml | 1 + 4 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/components/ManagerPage/Dashboard.js b/src/components/ManagerPage/Dashboard.js index 701062a0..06fdaa6a 100644 --- a/src/components/ManagerPage/Dashboard.js +++ b/src/components/ManagerPage/Dashboard.js @@ -1,13 +1,16 @@ // @flow import React from 'react' import { translate } from 'react-i18next' +import styled from 'styled-components' import type { T, Device } from 'types/common' import type { DeviceInfo } from 'helpers/devices/getDeviceInfo' import Box from 'components/base/Box' import Text from 'components/base/Text' +import IconExternalLink from 'icons/ExternalLink' import TrackPage from 'analytics/TrackPage' +import FakeLink from '../base/FakeLink' import AppsList from './AppsList' import FirmwareUpdate from './FirmwareUpdate' @@ -16,18 +19,34 @@ type Props = { t: T, device: Device, deviceInfo: DeviceInfo, + handleHelpRequest: () => void, } -const Dashboard = ({ device, deviceInfo, t }: Props) => ( +const Dashboard = ({ device, deviceInfo, t, handleHelpRequest }: Props) => ( {t('app:manager.title')} - - {t('app:manager.subtitle')} - + + + {t('app:manager.subtitle')} + + + + {t('app:common.needHelp')} + + + + @@ -41,3 +60,13 @@ const Dashboard = ({ device, deviceInfo, t }: Props) => ( ) export default translate()(Dashboard) + +const ContainerToHover = styled(Box).attrs({ + align: 'center', + ml: 'auto', + horizontal: true, +})` + ${FakeLink}:hover, &:hover { + color: ${p => p.theme.colors.wallet}; + } +` diff --git a/src/components/ManagerPage/index.js b/src/components/ManagerPage/index.js index 9eba78a4..6df4083b 100644 --- a/src/components/ManagerPage/index.js +++ b/src/components/ManagerPage/index.js @@ -2,6 +2,8 @@ import React, { PureComponent } from 'react' import invariant from 'invariant' +import { openURL } from 'helpers/linking' +import { urls } from 'config/support' import type { Device } from 'types/common' import type { DeviceInfo } from 'helpers/devices/getDeviceInfo' @@ -30,6 +32,11 @@ class ManagerPage extends PureComponent { this.setState({ isGenuine: true, device, deviceInfo }) } + handleHelpRequest = () => { + console.log('we are trying') + openURL(urls.managerHelpRequest) + } + render() { const { isGenuine, device, deviceInfo } = this.state @@ -40,7 +47,13 @@ class ManagerPage extends PureComponent { invariant(device, 'Inexistant device considered genuine') invariant(deviceInfo, 'Inexistant device infos for genuine device') - return + return ( + + ) } } diff --git a/src/config/support.js b/src/config/support.js index 19e9232a..cfe9a2f6 100644 --- a/src/config/support.js +++ b/src/config/support.js @@ -9,6 +9,7 @@ export const urls = { noDeviceBuyNew: 'https://www.ledgerwallet.com/', noDeviceTrackOrder: 'https://order.ledgerwallet.com/', noDeviceLearnMore: 'https://www.ledgerwallet.com/', + managerHelpRequest: 'https://support.ledgerwallet.com/hc/en-us/articles/360006523674 ', genuineCheckContactSupport: 'https://support.ledgerwallet.com/hc/en-us/requests/new?ticket_form_id=248165', // feesMoreInfo: 'https://www.ledgerwallet.com/', diff --git a/static/i18n/en/app.yml b/static/i18n/en/app.yml index 2edb6b3c..b7e0ead2 100644 --- a/static/i18n/en/app.yml +++ b/static/i18n/en/app.yml @@ -9,6 +9,7 @@ common: continue: Continue learnMore: Learn More skipThisStep: Skip this step + needHelp: Need help? chooseWalletPlaceholder: Choose a wallet... currency: Currency selectAccount: Select an account From 79a5b2e77cdcbe5c7692a31e090657258c35c838 Mon Sep 17 00:00:00 2001 From: Anastasia Poupeney Date: Wed, 4 Jul 2018 17:01:02 +0200 Subject: [PATCH 2/4] adding external links to labels in Send modal --- src/components/FeesField/BitcoinKind.js | 2 +- src/components/FeesField/EthereumKind.js | 2 +- src/components/FeesField/GenericContainer.js | 27 +++++++++-------- src/components/ManagerPage/index.js | 1 - src/components/base/LabelWithExternalIcon.js | 29 +++++++++++++++++++ .../modals/Send/fields/RecipientField.js | 16 ++++++---- src/config/support.js | 3 +- 7 files changed, 56 insertions(+), 24 deletions(-) create mode 100644 src/components/base/LabelWithExternalIcon.js diff --git a/src/components/FeesField/BitcoinKind.js b/src/components/FeesField/BitcoinKind.js index 0410eae4..8e027847 100644 --- a/src/components/FeesField/BitcoinKind.js +++ b/src/components/FeesField/BitcoinKind.js @@ -125,7 +125,7 @@ class FeesField extends Component const satoshi = units[units.length - 1] return ( - +