From 36a10843811d562b63f195dba7a150b7fc59d57b Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 17 Jan 2019 11:34:24 +0100 Subject: [PATCH 01/22] install react-qr-reader dependency --- package.json | 1 + yarn.lock | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/package.json b/package.json index 47b2fdaf..8247332f 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "react-dom": "^16.6.3", "react-hot-loader": "^4.6.2", "react-json-view": "^1.19.1", + "react-qr-reader": "^2.1.2", "react-qr-svg": "^2.1.0", "react-redux": "^6.0.0", "react-router": "^4.3.1", diff --git a/yarn.lock b/yarn.lock index 7df2acf9..143b3525 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5996,6 +5996,11 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" +jsqr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/jsqr/-/jsqr-1.1.1.tgz#a0d7f95e6c3b0bec913dfef2ca64a877f28ed05f" + integrity sha512-FVoMU2ncTyjaOqN/vwvDnZ7jaAVvFzM3LK3vG3jvQZFWJQlAwJ1XTCOgAEKo+4Rkd6ydMXTTvqGV/4w5VunmTw== + jssha@2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/jssha/-/jssha-2.3.1.tgz#147b2125369035ca4b2f7d210dc539f009b3de9a" @@ -7968,6 +7973,15 @@ react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" +react-qr-reader@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/react-qr-reader/-/react-qr-reader-2.1.2.tgz#ff3d7d377d3ffbd9d78a0947ca04221c2f180e15" + integrity sha512-SyRrRRRS7XcIyX8x6tb+mgcMqYZw6Admf4vlnUO/Z21nJklf6WILmP4jstd1W5tNlonvuC/S8R8/doIuZBgVjA== + dependencies: + jsqr "^1.1.1" + prop-types "^15.5.8" + webrtc-adapter "^6.4.0" + react-qr-svg@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/react-qr-svg/-/react-qr-svg-2.1.0.tgz#fceaf0e8bd367f714d89ae46e46b87c5201a99e9" @@ -8652,6 +8666,13 @@ rsvp@^3.3.3: version "3.6.2" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" +rtcpeerconnection-shim@^1.2.14: + version "1.2.15" + resolved "https://registry.yarnpkg.com/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz#e7cc189a81b435324c4949aa3dfb51888684b243" + integrity sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw== + dependencies: + sdp "^2.6.0" + run-async@^2.0.0, run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" @@ -8754,6 +8775,11 @@ scryptsy@^1.2.1: dependencies: pbkdf2 "^3.0.3" +sdp@^2.6.0, sdp@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/sdp/-/sdp-2.9.0.tgz#2eed2d9c0b26c81ff87593107895c68d6fb9a0a6" + integrity sha512-XAVZQO4qsfzVTHorF49zCpkdxiGmPNjA8ps8RcJGtGP3QJ/A8I9/SVg/QnkAFDMXIyGbHZBBFwYBw6WdnhT96w== + seamless-immutable@^7.1.3: version "7.1.4" resolved "https://registry.yarnpkg.com/seamless-immutable/-/seamless-immutable-7.1.4.tgz#6e9536def083ddc4dea0207d722e0e80d0f372f8" @@ -10654,6 +10680,14 @@ webpack@^4.16.3: watchpack "^1.5.0" webpack-sources "^1.0.1" +webrtc-adapter@^6.4.0: + version "6.4.8" + resolved "https://registry.yarnpkg.com/webrtc-adapter/-/webrtc-adapter-6.4.8.tgz#eeca3f0d5b40c0e629b865ef2a936a0b658274de" + integrity sha512-YM8yl545c/JhYcjGHgaCoA7jRK/KZuMwEDFeP2AcP0Auv5awEd+gZE0hXy9z7Ed3p9HvAXp8jdbe+4ESb1zxAw== + dependencies: + rtcpeerconnection-shim "^1.2.14" + sdp "^2.9.0" + websocket-driver@>=0.5.1: version "0.7.0" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" From e943de644a5455b3e96ed639e814c2f1172f18cc Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 17 Jan 2019 15:06:49 +0100 Subject: [PATCH 02/22] add qr code icon --- src/config/icons.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/config/icons.js b/src/config/icons.js index 689ada8d..c96de6ea 100644 --- a/src/config/icons.js +++ b/src/config/icons.js @@ -67,6 +67,9 @@ export default { SUCCESS: [ 'M692.8 313.92l-1.92-1.92c-6.246-7.057-15.326-11.484-25.44-11.484s-19.194 4.427-25.409 11.448l-0.031 0.036-196.48 224-3.84 1.6-3.84-1.92-48.64-57.28c-7.010-7.905-17.193-12.862-28.533-12.862-21.031 0-38.080 17.049-38.080 38.080 0 7.495 2.165 14.485 5.905 20.377l-0.092-0.155 100.8 148.16c5.391 8.036 14.386 13.292 24.618 13.44h8.662c17.251-0.146 32.385-9.075 41.163-22.529l0.117-0.191 195.2-296.32c4.473-6.632 7.141-14.803 7.141-23.597 0-11.162-4.297-21.32-11.326-28.911l0.025 0.028z', ], + QRCODE: [ + 'M832 1024l-64 0l0 -128l64 0l0 128Zm-320 0l-64 0l0 -128l64 0l0 128Zm192 0l-128 0l0 -128l128 0l0 128Zm192 -192l64 0l0 64l64 0l0 128l-128 0l0 -192Zm-896 -192l384 0l0 384l-384 0l0 -384Zm320 320l0 -256l-256 0l0 256l256 0Zm-64 -64l-128 0l0 -128l128 0l0 128Zm512 0l-64 0l0 -64l64 0l0 64Zm-192 -128l0 128l-64 0l0 -64l-64 0l0 -64l128 0Zm128 64l-64 0l0 -64l64 0l0 64Zm192 0l-128 0l0 -64l128 0l0 64Zm-256 -64l-64 0l0 -64l64 0l0 64Zm320 -64l-64 0l0 -64l128 0l0 128l-64 0l0 -64Zm-384 0l-128 0l0 -128l128 0l0 128Zm64 -64l64 0l0 -64l128 0l0 128l-192 0l0 -64Zm-320 -128l64 0l0 -64l64 0l0 128l-128 0l0 -64Zm256 0l-64 0l0 -64l192 0l0 128l-128 0l0 -64Zm-576 -64l128 0l0 64l64 0l0 64l-192 0l0 -128Zm896 64l-128 0l0 -64l256 0l0 128l-128 0l0 -64Zm-576 0l-128 0l0 -64l128 0l0 64Zm192 -64l-64 0l0 -64l64 0l0 64Zm-512 -448l384 0l0 384l-384 0l0 -384Zm576 384l-64 0l0 -128l64 0l0 128Zm64 -384l384 0l0 384l-384 0l0 -384Zm-320 320l0 -256l-256 0l0 256l256 0Zm640 0l0 -256l-256 0l0 256l256 0Zm-704 -64l-128 0l0 -128l128 0l0 128Zm640 0l-128 0l0 -128l128 0l0 128Zm-384 -256l0 64l64 0l0 128l-64 0l0 64l-64 0l0 -256l64 0Z', + ], }; /* From 8e852a925c01d1f24dc42b039d7acd053f814cf5 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 17 Jan 2019 15:29:55 +0100 Subject: [PATCH 03/22] add crypto URI parser from the old wallet --- src/utils/cryptoUriParser.js | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/utils/cryptoUriParser.js diff --git a/src/utils/cryptoUriParser.js b/src/utils/cryptoUriParser.js new file mode 100644 index 00000000..defb6a4f --- /dev/null +++ b/src/utils/cryptoUriParser.js @@ -0,0 +1,39 @@ +/* eslint-disable no-param-reassign */ +/* eslint-disable prefer-destructuring */ +/* @flow */ + +// copy paste from mytrezor (old wallet) https://github.com/satoshilabs/mytrezor/blob/87f8a8d9ca82a27b3941c5ec0f399079903f2bfd/app/components/address-input/address-input.js + +export type parsedURI = { + address: string, + amount: ?string, +}; + +// Parse a string read from a bitcoin QR code into an object +export const parseUri = (uri: string): ?parsedURI => { + const str = stripPrefix(uri); + const query: Array = str.split('?'); + const values: Object = (query.length > 1) ? parseQuery(query[1]) : {}; + values.address = query[0]; + + return values; +}; + +const stripPrefix = (str: string): string => { + if (!str.match(':')) { + return str; + } + const parts = str.split(':'); + parts.shift(); + return parts.join(''); +}; + +// Parse URL query string (like 'foo=bar&baz=1337) into an object +const parseQuery = (str: string): {} => str.split('&') + .map(val => val.split('=')) + .reduce((vals, pair) => { + if (pair.length > 1) { + vals[pair[0]] = pair[1]; + } + return vals; + }, {}); From 549ae16b0e4e1bec261608a761ccda8efbe1c632 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 17 Jan 2019 17:12:12 +0100 Subject: [PATCH 04/22] add modal for scanning qr codes --- src/actions/ModalActions.js | 33 +++++ src/actions/constants/modal.js | 2 + src/components/modals/QrModal/index.js | 160 +++++++++++++++++++++++++ src/components/modals/index.js | 19 +++ src/reducers/ModalReducer.js | 7 ++ 5 files changed, 221 insertions(+) create mode 100644 src/components/modals/QrModal/index.js diff --git a/src/actions/ModalActions.js b/src/actions/ModalActions.js index cbb48e9d..47f98776 100644 --- a/src/actions/ModalActions.js +++ b/src/actions/ModalActions.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ /* @flow */ import TrezorConnect, { UI } from 'trezor-connect'; @@ -9,6 +10,10 @@ import type { ThunkAction, AsyncAction, Action, GetState, Dispatch, TrezorDevice, } from 'flowtype'; import type { State } from 'reducers/ModalReducer'; +import type { parsedURI } from 'utils/cryptoUriParser'; + +import sendEthereumFormActions from './ethereum/SendFormActions'; +import sendRippleFormActions from './ripple/SendFormActions'; export type ModalAction = { type: typeof MODAL.CLOSE @@ -16,8 +21,11 @@ export type ModalAction = { type: typeof MODAL.OPEN_EXTERNAL_WALLET, id: string, url: string, +} | { + type: typeof MODAL.OPEN_SCAN_QR, }; + export const onPinSubmit = (value: string): Action => { TrezorConnect.uiResponse({ type: UI.RECEIVE_PIN, payload: value }); return { @@ -139,6 +147,29 @@ export const gotoExternalWallet = (id: string, url: string): ThunkAction => (dis }); }; +export const openQrModal = (): ThunkAction => (dispatch: Dispatch): void => { + dispatch({ + type: MODAL.OPEN_SCAN_QR, + }); +}; + +export const onQrScan = (parsedUri: parsedURI, networkType: string): ThunkAction => (dispatch: Dispatch): void => { + const { address = '', amount } = parsedUri; + switch (networkType) { + case 'ethereum': + dispatch(sendEthereumFormActions.onAddressChange(address)); + if (amount) dispatch(sendEthereumFormActions.onAmountChange(amount)); + break; + case 'ripple': + dispatch(sendRippleFormActions.onAddressChange(address)); + if (amount) dispatch(sendRippleFormActions.onAmountChange(amount)); + break; + default: + break; + } +}; + + export default { onPinSubmit, onPassphraseSubmit, @@ -149,4 +180,6 @@ export default { onDuplicateDevice, onWalletTypeRequest, gotoExternalWallet, + openQrModal, + onQrScan, }; \ No newline at end of file diff --git a/src/actions/constants/modal.js b/src/actions/constants/modal.js index 6e53d156..3383e91a 100644 --- a/src/actions/constants/modal.js +++ b/src/actions/constants/modal.js @@ -5,3 +5,5 @@ export const OPEN_EXTERNAL_WALLET: 'modal__external_wallet' = 'modal__external_w export const CONTEXT_NONE: 'modal_ctx_none' = 'modal_ctx_none'; export const CONTEXT_DEVICE: 'modal_ctx_device' = 'modal_ctx_device'; export const CONTEXT_EXTERNAL_WALLET: 'modal_ctx_external-wallet' = 'modal_ctx_external-wallet'; +export const OPEN_SCAN_QR: 'modal__open_scan_qr' = 'modal__open_scan_qr'; +export const CONTEXT_SCAN_QR: 'modal__ctx_scan_qr' = 'modal__ctx_scan_qr'; diff --git a/src/components/modals/QrModal/index.js b/src/components/modals/QrModal/index.js new file mode 100644 index 00000000..d2b6b0d2 --- /dev/null +++ b/src/components/modals/QrModal/index.js @@ -0,0 +1,160 @@ +/* eslint-disable jsx-a11y/click-events-have-key-events */ +/* @flow */ + +import * as React from 'react'; +import PropTypes from 'prop-types'; +import QrReader from 'react-qr-reader'; +import styled from 'styled-components'; + +import colors from 'config/colors'; +import icons from 'config/icons'; + +import { H2 } from 'components/Heading'; +import P from 'components/Paragraph'; +import Icon from 'components/Icon'; +import Link from 'components/Link'; + +import { parseUri } from 'utils/cryptoUriParser'; +import type { parsedURI } from 'utils/cryptoUriParser'; +import type { Props as BaseProps } from '../Container'; + +const Wrapper = styled.div` + width: 100%; + max-width: 620px; + padding: 40px 0px 20px 0px; +`; + +const Padding = styled.div` + padding: 0px 48px; +`; + +const CloseLink = styled(Link)` + position: absolute; + right: 15px; + top: 15px; +`; + +const CameraPlaceholder = styled(P)` + text-align: center; + padding: 10px 0; +`; + +const Error = styled(P)` + text-align: center; + padding: 10px 0; + color: ${colors.ERROR_PRIMARY}; +`; + +const StyledQrReader = styled(QrReader)` + padding: 10px 0; +`; + +// TODO fix types +type Props = { + onScan: (data: parsedURI) => any, + onError?: (error: any) => any, + onCancel?: $ElementType<$ElementType, 'onCancel'>; +} + +type State = { + readerLoaded: boolean, + error: any, +}; + +class QrModal extends React.Component { + constructor(props: Props) { + super(props); + this.state = { + readerLoaded: false, + error: null, + }; + } + + onLoad = () => { + this.setState({ + readerLoaded: true, + }); + } + + handleScan = (data: string) => { + if (data) { + try { + const parsedUri = parseUri(data); + if (parsedUri) { + this.props.onScan(parsedUri); + // reset error + this.setState({ + error: null, + }); + // close window + this.handleCancel(); + } + } catch (error) { + this.handleError(error); + } + } + } + + handleError = (err: any) => { + console.log(err); + this.setState({ + error: err, + }); + + if (this.props.onError) { + this.props.onError(err); + } + } + + handleCancel = () => { + if (this.props.onCancel) { + this.props.onCancel(); + } + } + + + render() { + return ( + + + + + +

Scan an address from a QR code

+ {!this.state.readerLoaded && ( + + Waiting for camera... + ) + } +
+ + + {this.state.error && ( + + {this.state.error.toString()} + + )} + +
+ ); + } +} + +QrModal.propTypes = { + onScan: PropTypes.func.isRequired, + onError: PropTypes.func, + onCancel: PropTypes.func, +}; + +export default QrModal; diff --git a/src/components/modals/index.js b/src/components/modals/index.js index 0e5c5782..cd7edba8 100644 --- a/src/components/modals/index.js +++ b/src/components/modals/index.js @@ -29,6 +29,8 @@ import Nem from 'components/modals/external/Nem'; import Cardano from 'components/modals/external/Cardano'; import Stellar from 'components/modals/external/Stellar'; +import QrModal from 'components/modals/QrModal'; + import type { Props } from './Container'; const ModalContainer = styled.div` @@ -166,6 +168,20 @@ const getExternalContextModal = (props: Props) => { } }; +const getQrModal = (props: Props) => { + const { modalActions, selectedAccount } = props; + + if (!selectedAccount.network) return null; + const networkType = selectedAccount.network.type; + + return ( + modalActions.onQrScan(parsedUri, networkType)} + /> + ); +}; + // modal container component const Modal = (props: Props) => { const { modal } = props; @@ -179,6 +195,9 @@ const Modal = (props: Props) => { case MODAL.CONTEXT_EXTERNAL_WALLET: component = getExternalContextModal(props); break; + case MODAL.CONTEXT_SCAN_QR: + component = getQrModal(props); + break; default: break; } diff --git a/src/reducers/ModalReducer.js b/src/reducers/ModalReducer.js index 4f3168df..266ced8b 100644 --- a/src/reducers/ModalReducer.js +++ b/src/reducers/ModalReducer.js @@ -18,6 +18,8 @@ export type State = { } | { context: typeof MODAL.CONTEXT_EXTERNAL_WALLET, windowType?: string; +} | { + context: typeof MODAL.CONTEXT_SCAN_QR, } const initialState: State = { @@ -91,6 +93,11 @@ export default function modal(state: State = initialState, action: Action): Stat windowType: action.id, }; + case MODAL.OPEN_SCAN_QR: + return { + context: MODAL.CONTEXT_SCAN_QR, + }; + default: return state; } From 01b789a78e9aede7a8d384d5d0477bd8d65a2b1e Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 17 Jan 2019 17:13:21 +0100 Subject: [PATCH 05/22] add button to scan qr code next to the address input --- .../views/Account/Send/ethereum/Container.js | 4 ++++ .../views/Account/Send/ethereum/index.js | 21 ++++++++++++++++++ .../views/Account/Send/ripple/Container.js | 3 +++ .../Wallet/views/Account/Send/ripple/index.js | 22 +++++++++++++++++++ 4 files changed, 50 insertions(+) diff --git a/src/views/Wallet/views/Account/Send/ethereum/Container.js b/src/views/Wallet/views/Account/Send/ethereum/Container.js index 19982c8f..baa378d2 100644 --- a/src/views/Wallet/views/Account/Send/ethereum/Container.js +++ b/src/views/Wallet/views/Account/Send/ethereum/Container.js @@ -4,6 +4,7 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import SendFormActions from 'actions/ethereum/SendFormActions'; +import { openQrModal } from 'actions/ModalActions'; import type { MapStateToProps, MapDispatchToProps } from 'react-redux'; import type { State, Dispatch } from 'flowtype'; import AccountSend from './index'; @@ -20,6 +21,7 @@ export type StateProps = { export type DispatchProps = { sendFormActions: typeof SendFormActions, + openQrModal: typeof openQrModal, } export type Props = StateProps & DispatchProps; @@ -34,6 +36,8 @@ const mapStateToProps: MapStateToProps = (state: St const mapDispatchToProps: MapDispatchToProps = (dispatch: Dispatch): DispatchProps => ({ sendFormActions: bindActionCreators(SendFormActions, dispatch), + openQrModal: bindActionCreators(openQrModal, dispatch), + }); export default connect(mapStateToProps, mapDispatchToProps)(AccountSend); \ No newline at end of file diff --git a/src/views/Wallet/views/Account/Send/ethereum/index.js b/src/views/Wallet/views/Account/Send/ethereum/index.js index 4da01e1d..2c328844 100644 --- a/src/views/Wallet/views/Account/Send/ethereum/index.js +++ b/src/views/Wallet/views/Account/Send/ethereum/index.js @@ -159,6 +159,14 @@ const AdvancedSettingsIcon = styled(Icon)` margin-left: 10px; `; +const QrButton = styled(Button)` + border-top-left-radius: 0px; + border-bottom-left-radius: 0px; + border-left: 0px; + height: 40px; + padding: 0 10px; +`; + // render helpers const getAddressInputState = (address: string, addressErrors: string, addressWarnings: string): string => { let state = ''; @@ -281,6 +289,19 @@ const AccountSend = (props: Props) => { bottomText={errors.address || warnings.address || infos.address} value={address} onChange={event => onAddressChange(event.target.value)} + sideAddons={[( + + + + )]} /> diff --git a/src/views/Wallet/views/Account/Send/ripple/Container.js b/src/views/Wallet/views/Account/Send/ripple/Container.js index ea29c363..aeebe926 100644 --- a/src/views/Wallet/views/Account/Send/ripple/Container.js +++ b/src/views/Wallet/views/Account/Send/ripple/Container.js @@ -4,6 +4,7 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import SendFormActions from 'actions/ripple/SendFormActions'; +import { openQrModal } from 'actions/ModalActions'; import type { MapStateToProps, MapDispatchToProps } from 'react-redux'; import type { State, Dispatch } from 'flowtype'; import AccountSend from './index'; @@ -20,6 +21,7 @@ export type StateProps = { export type DispatchProps = { sendFormActions: typeof SendFormActions, + openQrModal: typeof openQrModal, } export type Props = StateProps & DispatchProps; @@ -34,6 +36,7 @@ const mapStateToProps: MapStateToProps = (state: St const mapDispatchToProps: MapDispatchToProps = (dispatch: Dispatch): DispatchProps => ({ sendFormActions: bindActionCreators(SendFormActions, dispatch), + openQrModal: bindActionCreators(openQrModal, dispatch), }); export default connect(mapStateToProps, mapDispatchToProps)(AccountSend); \ No newline at end of file diff --git a/src/views/Wallet/views/Account/Send/ripple/index.js b/src/views/Wallet/views/Account/Send/ripple/index.js index f6582587..c9d0eaba 100644 --- a/src/views/Wallet/views/Account/Send/ripple/index.js +++ b/src/views/Wallet/views/Account/Send/ripple/index.js @@ -156,6 +156,15 @@ const AdvancedSettingsIcon = styled(Icon)` margin-left: 10px; `; +const QrButton = styled(Button)` + border-top-left-radius: 0px; + border-bottom-left-radius: 0px; + border-left: 0px; + height: 40px; + padding: 0 10px; +`; + + // render helpers const getAddressInputState = (address: string, addressErrors: string, addressWarnings: string): string => { let state = ''; @@ -254,6 +263,19 @@ const AccountSend = (props: Props) => { bottomText={errors.address || warnings.address || infos.address} value={address} onChange={event => onAddressChange(event.target.value)} + sideAddons={[( + + + + )]} /> From f8d8ff02d13b72fa9198ea5f203d228da4e050b6 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 17 Jan 2019 17:20:16 +0100 Subject: [PATCH 06/22] add missing margin-top to textarea's error message --- src/components/Textarea/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Textarea/index.js b/src/components/Textarea/index.js index b0dbad2c..1566b416 100644 --- a/src/components/Textarea/index.js +++ b/src/components/Textarea/index.js @@ -109,6 +109,7 @@ const TopLabel = styled.span` `; const BottomText = styled.span` + margin-top: 10px; font-size: ${FONT_SIZE.SMALL}; color: ${props => (props.color ? props.color : colors.TEXT_SECONDARY)}; `; From dbc5e868980072077aff0ac6446d0bb314357e13 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 17 Jan 2019 17:57:03 +0100 Subject: [PATCH 07/22] bigger close button for modals --- src/components/modals/confirm/UnverifiedAddress/index.js | 2 +- src/components/modals/device/Duplicate/index.js | 2 +- src/components/modals/device/WalletType/index.js | 2 +- src/components/modals/external/Cardano/index.js | 2 +- src/components/modals/external/Nem/index.js | 2 +- src/components/modals/external/Stellar/index.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/modals/confirm/UnverifiedAddress/index.js b/src/components/modals/confirm/UnverifiedAddress/index.js index 2246cdf1..b70de888 100644 --- a/src/components/modals/confirm/UnverifiedAddress/index.js +++ b/src/components/modals/confirm/UnverifiedAddress/index.js @@ -99,7 +99,7 @@ class ConfirmUnverifiedAddress extends PureComponent { return ( - +

{ deviceStatus }

To prevent phishing attacks, you should verify the address on your Trezor first. { claim } to continue with the verification process. diff --git a/src/components/modals/device/Duplicate/index.js b/src/components/modals/device/Duplicate/index.js index 78d3d5f8..735c208e 100644 --- a/src/components/modals/device/Duplicate/index.js +++ b/src/components/modals/device/Duplicate/index.js @@ -138,7 +138,7 @@ class DuplicateDevice extends PureComponent { return ( - +

Clone { device.label }?

This will create new instance of device which can be used with different passphrase diff --git a/src/components/modals/device/WalletType/index.js b/src/components/modals/device/WalletType/index.js index 89d7d600..ab88c449 100644 --- a/src/components/modals/device/WalletType/index.js +++ b/src/components/modals/device/WalletType/index.js @@ -105,7 +105,7 @@ class WalletType extends PureComponent { { device.state && ( diff --git a/src/components/modals/external/Cardano/index.js b/src/components/modals/external/Cardano/index.js index 8479fed9..376d41b1 100644 --- a/src/components/modals/external/Cardano/index.js +++ b/src/components/modals/external/Cardano/index.js @@ -48,7 +48,7 @@ const CardanoWallet = (props: Props) => ( diff --git a/src/components/modals/external/Nem/index.js b/src/components/modals/external/Nem/index.js index 74fcefd0..ff852709 100644 --- a/src/components/modals/external/Nem/index.js +++ b/src/components/modals/external/Nem/index.js @@ -46,7 +46,7 @@ const NemWallet = (props: Props) => ( diff --git a/src/components/modals/external/Stellar/index.js b/src/components/modals/external/Stellar/index.js index c9a005a0..040b3f6f 100644 --- a/src/components/modals/external/Stellar/index.js +++ b/src/components/modals/external/Stellar/index.js @@ -48,7 +48,7 @@ const StellarWallet = (props: Props) => ( From d919dc00d781610c7982d3eb663a84a33f49ee25 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 17 Jan 2019 17:58:28 +0100 Subject: [PATCH 08/22] change paddings in Log component --- src/components/Log/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/Log/index.js b/src/components/Log/index.js index 823a58b0..f39442eb 100644 --- a/src/components/Log/index.js +++ b/src/components/Log/index.js @@ -22,7 +22,7 @@ const Wrapper = styled.div` position: relative; color: ${colors.INFO_PRIMARY}; background: ${colors.INFO_SECONDARY}; - padding: 24px 48px; + padding: 24px; display: flex; flex-direction: column; text-align: left; @@ -32,9 +32,10 @@ const Wrapper = styled.div` const Click = styled.div` cursor: pointer; position: absolute; - top: 8px; + top: 0; right: 0; - padding: 12px; + padding-right: inherit; + padding-top: inherit; color: inherit; transition: opacity 0.3s; @@ -61,7 +62,7 @@ const Log = (props: Props): ?React$Element => { return ( - +

Log

Attention: The log contains your XPUBs. Anyone with your XPUBs can see your account history. From a17ba7dfce081a667d701097ecbfd97aa68e7b13 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 17 Jan 2019 18:22:05 +0100 Subject: [PATCH 09/22] style set default button as a green link --- .../Send/ethereum/components/AdvancedForm/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.js b/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.js index 6341c8d6..5c565db5 100644 --- a/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.js +++ b/src/views/Wallet/views/Account/Send/ethereum/components/AdvancedForm/index.js @@ -4,6 +4,7 @@ import * as React from 'react'; import styled from 'styled-components'; import colors from 'config/colors'; +import Link from 'components/Link'; import Input from 'components/inputs/Input'; import Textarea from 'components/Textarea'; import Tooltip from 'components/Tooltip'; @@ -117,7 +118,10 @@ const Right = styled.div` display: flex; flex-direction: row; font-size: ${FONT_SIZE.SMALL}; - cursor: pointer; +`; + +const StyledLink = styled(Link)` + white-space: nowrap; `; // stateless component @@ -190,8 +194,8 @@ const AdvancedForm = (props: Props) => { { showDefaultGasLimitButton && ( - setDefaultGasLimit()}> - Set default + + Set default ) } From 75074c5b55ba6d0dc4b3023b94a27cb53249d887 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 17 Jan 2019 21:43:35 +0100 Subject: [PATCH 10/22] remove eslint ignore rule --- src/components/modals/QrModal/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/modals/QrModal/index.js b/src/components/modals/QrModal/index.js index d2b6b0d2..2fb8426b 100644 --- a/src/components/modals/QrModal/index.js +++ b/src/components/modals/QrModal/index.js @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/click-events-have-key-events */ /* @flow */ import * as React from 'react'; From 0f93d2052ede0969f0852c385edbcc317f3bb077 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Fri, 18 Jan 2019 00:53:30 +0100 Subject: [PATCH 11/22] responsive qr modal --- src/components/modals/QrModal/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/modals/QrModal/index.js b/src/components/modals/QrModal/index.js index 2fb8426b..ce5fc998 100644 --- a/src/components/modals/QrModal/index.js +++ b/src/components/modals/QrModal/index.js @@ -18,8 +18,8 @@ import type { parsedURI } from 'utils/cryptoUriParser'; import type { Props as BaseProps } from '../Container'; const Wrapper = styled.div` - width: 100%; - max-width: 620px; + width: 90vw; + max-width: 450px; padding: 40px 0px 20px 0px; `; From 2e5f7f6c4629c57ed5fd03bbdd448dcf30594c19 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Fri, 18 Jan 2019 13:46:11 +0100 Subject: [PATCH 12/22] fix title font size in WalletType modal --- src/components/modals/device/WalletType/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/modals/device/WalletType/index.js b/src/components/modals/device/WalletType/index.js index ab88c449..13b6fcdd 100644 --- a/src/components/modals/device/WalletType/index.js +++ b/src/components/modals/device/WalletType/index.js @@ -7,7 +7,7 @@ import styled, { css } from 'styled-components'; import icons from 'config/icons'; import colors from 'config/colors'; -import { H3 } from 'components/Heading'; +import { H2 } from 'components/Heading'; import P from 'components/Paragraph'; import Button from 'components/Button'; import Tooltip from 'components/Tooltip'; @@ -36,7 +36,7 @@ const Header = styled.div` color: ${colors.TEXT_PRIMARY}; `; -const StyledHeading = styled(H3)` +const StyledHeading = styled(H2)` padding-top: 30px; `; From 1aae8dc0b26ad5b1cdefcc077d35db1d8c72b9e0 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Fri, 18 Jan 2019 16:09:31 +0100 Subject: [PATCH 13/22] device counter centering using flexbox --- src/views/Wallet/components/LeftNavigation/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/Wallet/components/LeftNavigation/index.js b/src/views/Wallet/components/LeftNavigation/index.js index cca5eab1..c98c7b72 100644 --- a/src/views/Wallet/components/LeftNavigation/index.js +++ b/src/views/Wallet/components/LeftNavigation/index.js @@ -24,13 +24,14 @@ const Header = styled(DeviceHeader)` `; const Counter = styled.div` + display: flex; + justify-content: center; + align-items: center; border: 1px solid ${colors.DIVIDER}; border-radius: 50%; color: ${colors.TEXT_SECONDARY}; width: 24px; height: 24px; - line-height: 22px; - text-align: center; font-size: ${FONT_SIZE.COUNTER}; margin-right: 8px; `; From aa3f037ddf12c1ee2e0d9496f249babf2752d2bd Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Sat, 19 Jan 2019 19:34:25 +0100 Subject: [PATCH 14/22] prevent token name from breaking to multiple lines if unnecessary --- .../Wallet/views/Account/Summary/components/Token/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Wallet/views/Account/Summary/components/Token/index.js b/src/views/Wallet/views/Account/Summary/components/Token/index.js index 4999b447..69509647 100644 --- a/src/views/Wallet/views/Account/Summary/components/Token/index.js +++ b/src/views/Wallet/views/Account/Summary/components/Token/index.js @@ -46,7 +46,7 @@ const TokenText = styled.div` `; const TokenName = styled(TokenText)` - flex: 0 0 0; + flex: 1 1 0; padding-right: 5px; `; From 85326fdc861dc9fc0f722d401b2f6c703042544f Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Sat, 19 Jan 2019 20:07:51 +0100 Subject: [PATCH 15/22] fix styles for forget modal --- src/components/modals/device/Forget/index.js | 21 ++++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/components/modals/device/Forget/index.js b/src/components/modals/device/Forget/index.js index b0607d4d..89c904a7 100644 --- a/src/components/modals/device/Forget/index.js +++ b/src/components/modals/device/Forget/index.js @@ -4,7 +4,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; -import { H3 } from 'components/Heading'; +import { H2 } from 'components/Heading'; import P from 'components/Paragraph'; import Button from 'components/Button'; @@ -19,21 +19,20 @@ type Props = { const Wrapper = styled.div` width: 360px; - padding: 24px 48px; + padding: 30px 48px; `; const StyledP = styled(P)` - padding: 7px 0px; -`; - -const StyledButton = styled(Button)` - margin: 0 0 10px 0; + padding: 20px 0px; `; const Row = styled.div` display: flex; flex-direction: column; - padding: 10px 0; + + Button + Button { + margin-top: 10px; + } `; class ForgetDevice extends PureComponent { @@ -62,11 +61,11 @@ class ForgetDevice extends PureComponent { render() { return ( -

Forget { this.props.device.instanceLabel }?

+

Forget { this.props.device.instanceLabel }?

Forgetting only removes the device from the list on the left, your coins are still safe and you can access them by reconnecting your Trezor again. - this.forget()}>Forget - Don't forget + +
); From 34654f9a50217eaea50eab2ada17209bdf664e3c Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Sat, 19 Jan 2019 20:37:59 +0100 Subject: [PATCH 16/22] minor css changes, top and bottom padding on wrappers unified to 30px --- src/components/modals/confirm/Address/index.js | 2 +- src/components/modals/confirm/SignTx/index.js | 4 ++-- .../modals/confirm/UnverifiedAddress/index.js | 15 +++++++-------- .../modals/device/Duplicate/index.js | 2 +- src/components/modals/device/Remember/index.js | 18 +++++++++--------- .../modals/device/WalletType/index.js | 2 +- .../modals/external/Cardano/index.js | 2 +- src/components/modals/external/Nem/index.js | 4 ++-- .../modals/external/Stellar/index.js | 2 +- .../modals/passphrase/Passphrase/index.js | 2 +- src/components/modals/passphrase/Type/index.js | 2 +- src/components/modals/pin/Invalid/index.js | 2 +- src/components/modals/pin/Pin/index.js | 2 +- .../Landing/components/BetaDisclaimer/index.js | 2 +- 14 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/components/modals/confirm/Address/index.js b/src/components/modals/confirm/Address/index.js index 97538a97..93c49404 100644 --- a/src/components/modals/confirm/Address/index.js +++ b/src/components/modals/confirm/Address/index.js @@ -17,7 +17,7 @@ const Wrapper = styled.div` `; const Header = styled.div` - padding: 24px 48px; + padding: 30px 48px; `; const Content = styled.div` diff --git a/src/components/modals/confirm/SignTx/index.js b/src/components/modals/confirm/SignTx/index.js index 69278370..ad9ccd86 100644 --- a/src/components/modals/confirm/SignTx/index.js +++ b/src/components/modals/confirm/SignTx/index.js @@ -24,13 +24,13 @@ const Wrapper = styled.div` `; const Header = styled.div` - padding: 24px 48px; + padding: 30px 48px; `; const Content = styled.div` border-top: 1px solid ${colors.DIVIDER}; background: ${colors.MAIN}; - padding: 24px 48px; + padding: 30px 48px; border-radius: 4px; `; diff --git a/src/components/modals/confirm/UnverifiedAddress/index.js b/src/components/modals/confirm/UnverifiedAddress/index.js index b70de888..871068c0 100644 --- a/src/components/modals/confirm/UnverifiedAddress/index.js +++ b/src/components/modals/confirm/UnverifiedAddress/index.js @@ -31,21 +31,20 @@ const StyledLink = styled(Link)` const Wrapper = styled.div` width: 370px; - padding: 24px 48px; + padding: 30px 48px; `; const StyledP = styled(P)` - padding: 10px 0px; + padding: 20px 0px; `; const Row = styled.div` display: flex; flex-direction: column; - padding: 10px 0; -`; -const StyledButton = styled(Button)` - margin: 0 0 10px 0; + Button + Button { + margin-top: 10px; + } `; class ConfirmUnverifiedAddress extends PureComponent { @@ -104,8 +103,8 @@ class ConfirmUnverifiedAddress extends PureComponent {

{ deviceStatus }

To prevent phishing attacks, you should verify the address on your Trezor first. { claim } to continue with the verification process. - (!account ? this.verifyAddress() : 'false')}>Try again - this.showUnverifiedAddress()}>Show unverified address + +
); diff --git a/src/components/modals/device/Duplicate/index.js b/src/components/modals/device/Duplicate/index.js index 735c208e..75aebb38 100644 --- a/src/components/modals/device/Duplicate/index.js +++ b/src/components/modals/device/Duplicate/index.js @@ -41,7 +41,7 @@ const StyledLink = styled(Link)` const Wrapper = styled.div` width: 360px; - padding: 24px 48px; + padding: 30px 48px; `; const Column = styled.div` diff --git a/src/components/modals/device/Remember/index.js b/src/components/modals/device/Remember/index.js index 38de9115..02dde355 100644 --- a/src/components/modals/device/Remember/index.js +++ b/src/components/modals/device/Remember/index.js @@ -31,12 +31,12 @@ const ButtonContent = styled.div` `; const StyledP = styled(P)` - padding: 10px 0; + padding: 20px 0; `; const Wrapper = styled.div` width: 360px; - padding: 24px 48px; + padding: 30px 48px; `; const Text = styled.div` @@ -46,10 +46,10 @@ const Text = styled.div` const Column = styled.div` display: flex; flex-direction: column; -`; -const StyledButton = styled(Button)` - margin: 5px 0; + Button + Button { + margin-top: 10px; + } `; const StyledLoader = styled(Loader)` @@ -128,7 +128,7 @@ class RememberDevice extends PureComponent {

Forget {label}?

Would you like Trezor Wallet to forget your { devicePlural }, so that it is still visible even while disconnected? - this.forget()}> +
); diff --git a/src/components/modals/device/WalletType/index.js b/src/components/modals/device/WalletType/index.js index 13b6fcdd..ca91bc99 100644 --- a/src/components/modals/device/WalletType/index.js +++ b/src/components/modals/device/WalletType/index.js @@ -37,7 +37,7 @@ const Header = styled.div` `; const StyledHeading = styled(H2)` - padding-top: 30px; + padding: 30px 48px 10px 48px; `; const StyledLink = styled(Link)` diff --git a/src/components/modals/external/Cardano/index.js b/src/components/modals/external/Cardano/index.js index 376d41b1..645be885 100644 --- a/src/components/modals/external/Cardano/index.js +++ b/src/components/modals/external/Cardano/index.js @@ -26,7 +26,7 @@ const Wrapper = styled.div` `; const StyledButton = styled(Button)` - margin: 10px 0 10px 0; + margin-top: 10px; width: 100%; `; diff --git a/src/components/modals/external/Nem/index.js b/src/components/modals/external/Nem/index.js index ff852709..993e097f 100644 --- a/src/components/modals/external/Nem/index.js +++ b/src/components/modals/external/Nem/index.js @@ -22,11 +22,11 @@ type Props = { const Wrapper = styled.div` width: 100%; max-width: 620px; - padding: 24px 48px; + padding: 30px 48px; `; const StyledButton = styled(Button)` - margin: 0 0 10px 0; + margin-top: 10px; width: 100%; `; diff --git a/src/components/modals/external/Stellar/index.js b/src/components/modals/external/Stellar/index.js index 040b3f6f..2ba4a863 100644 --- a/src/components/modals/external/Stellar/index.js +++ b/src/components/modals/external/Stellar/index.js @@ -26,7 +26,7 @@ const Wrapper = styled.div` `; const StyledButton = styled(Button)` - margin: 10px 0 10px 0; + margin-top: 10px; width: 100%; `; diff --git a/src/components/modals/passphrase/Passphrase/index.js b/src/components/modals/passphrase/Passphrase/index.js index 0ad3a3f4..553be60e 100644 --- a/src/components/modals/passphrase/Passphrase/index.js +++ b/src/components/modals/passphrase/Passphrase/index.js @@ -31,7 +31,7 @@ type State = { }; const Wrapper = styled.div` - padding: 24px 48px; + padding: 30px 48px; max-width: 390px; `; diff --git a/src/components/modals/passphrase/Type/index.js b/src/components/modals/passphrase/Type/index.js index ce659800..fa44d5b1 100644 --- a/src/components/modals/passphrase/Type/index.js +++ b/src/components/modals/passphrase/Type/index.js @@ -19,7 +19,7 @@ type Props = { const Wrapper = styled.div` width: 360px; - padding: 24px 48px; + padding: 30px 48px; `; const Header = styled.div``; diff --git a/src/components/modals/pin/Invalid/index.js b/src/components/modals/pin/Invalid/index.js index e69d7554..a69bbd64 100644 --- a/src/components/modals/pin/Invalid/index.js +++ b/src/components/modals/pin/Invalid/index.js @@ -14,7 +14,7 @@ type Props = { } const Wrapper = styled.div` - padding: 24px 48px; + padding: 30px 48px; `; const InvalidPin = (props: Props) => ( diff --git a/src/components/modals/pin/Pin/index.js b/src/components/modals/pin/Pin/index.js index ed74e834..31cf42d3 100644 --- a/src/components/modals/pin/Pin/index.js +++ b/src/components/modals/pin/Pin/index.js @@ -25,7 +25,7 @@ type State = { } const Wrapper = styled.div` - padding: 24px 48px; + padding: 30px 48px; `; const InputRow = styled.div` diff --git a/src/views/Landing/components/BetaDisclaimer/index.js b/src/views/Landing/components/BetaDisclaimer/index.js index 61c54570..d9dfd824 100644 --- a/src/views/Landing/components/BetaDisclaimer/index.js +++ b/src/views/Landing/components/BetaDisclaimer/index.js @@ -36,7 +36,7 @@ const ModalWindow = styled.div` text-align: center; width: 100%; max-width: 620px; - padding: 24px 48px; + padding: 30px 48px; `; const StyledP = styled(P)` From f49a202da668e162cd79a996f0e77581d4c2868c Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Sat, 19 Jan 2019 20:51:43 +0100 Subject: [PATCH 17/22] change padding --- src/components/modals/QrModal/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/modals/QrModal/index.js b/src/components/modals/QrModal/index.js index ce5fc998..d581a8ea 100644 --- a/src/components/modals/QrModal/index.js +++ b/src/components/modals/QrModal/index.js @@ -20,7 +20,7 @@ import type { Props as BaseProps } from '../Container'; const Wrapper = styled.div` width: 90vw; max-width: 450px; - padding: 40px 0px 20px 0px; + padding: 30px 0px; `; const Padding = styled.div` From 454410fd5c024f7b51807d01e9ba39f7c7d21dee Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Sat, 19 Jan 2019 23:05:16 +0100 Subject: [PATCH 18/22] improved styling of device menu --- .../components/DeviceMenu/components/MenuItems/index.js | 2 +- .../components/LeftNavigation/components/DeviceMenu/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js index 53fc615b..0abfb858 100644 --- a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/components/MenuItems/index.js @@ -9,7 +9,7 @@ import { FONT_SIZE } from 'config/variables'; const Wrapper = styled.div` padding: 0px 24px 8px 19px; - border-bottom: 1px solid ${colors.DIVIDER}; + box-shadow: 0 3px 8px rgba(0,0,0,0.06); background: ${colors.WHITE}; `; diff --git a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js index 9cdc96be..8899072f 100644 --- a/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js @@ -10,7 +10,7 @@ import DeviceList from './components/DeviceList'; import type { Props } from '../common'; -import AsideDivider from '../Divider'; +import Divider from '../Divider'; const Wrapper = styled.div``; const ButtonWrapper = styled.div` @@ -104,7 +104,7 @@ class DeviceMenu extends PureComponent { return ( {this.showMenuItems() && } - {this.showDivider() && } + {this.showDivider() && } Date: Sat, 19 Jan 2019 23:11:44 +0100 Subject: [PATCH 19/22] add missing wallet border radius --- .../LeftNavigation/components/StickyContainer/index.js | 5 +++++ src/views/Wallet/index.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/views/Wallet/components/LeftNavigation/components/StickyContainer/index.js b/src/views/Wallet/components/LeftNavigation/components/StickyContainer/index.js index 4d10baef..2362ac81 100644 --- a/src/views/Wallet/components/LeftNavigation/components/StickyContainer/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/StickyContainer/index.js @@ -30,6 +30,11 @@ const AsideWrapper = styled.aside.attrs(props => ({ overflow: hidden; background: ${colors.MAIN}; border-right: 1px solid ${colors.DIVIDER}; + border-top-left-radius: 4px; + + @media screen and (max-width: 1170px) { + border-top-left-radius: 0px; + } `; const StickyContainerWrapper = styled.div.attrs(props => ({ diff --git a/src/views/Wallet/index.js b/src/views/Wallet/index.js index 1a63e5f5..f6063eb9 100644 --- a/src/views/Wallet/index.js +++ b/src/views/Wallet/index.js @@ -66,6 +66,11 @@ const MainContent = styled.article` display: flex; flex-direction: column; overflow: auto; + border-top-right-radius: 4px; + + @media screen and (max-width: 1170px) { + border-top-right-radius: 0px; + } `; const Navigation = styled.nav` From 7f07564ab65eed1271c37866e148afbf27bc537a Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Sat, 19 Jan 2019 23:30:22 +0100 Subject: [PATCH 20/22] fix font weight in Divider to match design guidelines --- .../components/LeftNavigation/components/Divider/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/Wallet/components/LeftNavigation/components/Divider/index.js b/src/views/Wallet/components/LeftNavigation/components/Divider/index.js index 8f29337e..4b722a7d 100644 --- a/src/views/Wallet/components/LeftNavigation/components/Divider/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/Divider/index.js @@ -3,7 +3,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import colors from 'config/colors'; -import { FONT_SIZE } from 'config/variables'; +import { FONT_SIZE, FONT_WEIGHT } from 'config/variables'; const Wrapper = styled.div` display: flex; @@ -18,13 +18,17 @@ const Wrapper = styled.div` `} `; +const TextLeft = styled.p` + font-weight: ${FONT_WEIGHT.MEDIUM}; +`; + const Divider = ({ textLeft, textRight, hasBorder = false, }) => ( -

{textLeft}

+ {textLeft}

{textRight}

); From 1280800c91bea2f503dab643b8f9e9e203c19137 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Sun, 20 Jan 2019 00:15:54 +0100 Subject: [PATCH 21/22] cursor pointer on buttons in Pin modal --- src/components/modals/pin/Pin/components/Button/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/modals/pin/Pin/components/Button/index.js b/src/components/modals/pin/Pin/components/Button/index.js index 5b592dc6..65b8c0a4 100644 --- a/src/components/modals/pin/Pin/components/Button/index.js +++ b/src/components/modals/pin/Pin/components/Button/index.js @@ -22,6 +22,7 @@ const Wrapper = styled.button` border: 1px solid ${colors.DIVIDER}; background: ${colors.WHITE}; transition: all 0.3s; + cursor: pointer; &:first-child { margin-left: 0px; From 67a1b6af4ef871e9c03099dca89a991da165cbec Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Mon, 21 Jan 2019 15:42:48 +0100 Subject: [PATCH 22/22] fix overlap of action button and close button in notification layout --- src/components/Notification/index.js | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/components/Notification/index.js b/src/components/Notification/index.js index a8622de7..721a7463 100644 --- a/src/components/Notification/index.js +++ b/src/components/Notification/index.js @@ -58,11 +58,8 @@ const Title = styled.div` `; const CloseClick = styled.div` - position: absolute; - right: 0; - top: 0; - padding-right: inherit; - padding-top: inherit; + margin-left: 24px; + align-self: flex-start; cursor: pointer; `; @@ -102,15 +99,6 @@ const Notification = (props: Props): React$Element => { {props.loading && } - {props.cancelable && ( - close()}> - - - )} => { )} + {props.cancelable && ( + close()}> + + + )} );