diff --git a/.babelrc b/.babelrc index e6f68a95..8194dcfa 100644 --- a/.babelrc +++ b/.babelrc @@ -17,14 +17,7 @@ }], ["babel-plugin-root-import", { "rootPathSuffix": "./src", - "rootPathPrefix": "~", - "alias": { - "components": "./src/js/components", - "config": "./src/js/config", - "reducers": "./src/js/reducers", - "actions": "./src/js/actions", - "services": "./src/js/services" - } + "rootPathPrefix": "~" }], "babel-plugin-styled-components" ], diff --git a/.eslintrc b/.eslintrc index 0b2f5878..3e9c178c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -10,6 +10,7 @@ "jest": true }, "rules": { + "react/destructuring-assignment": 0, "react/jsx-one-expression-per-line": 0, "react/jsx-indent": [2, 4], "react/jsx-indent-props": [2, 4], diff --git a/src/js/components/common/Header.js b/src/js/components/common/Header.js index adb2d320..6136aed6 100644 --- a/src/js/components/common/Header.js +++ b/src/js/components/common/Header.js @@ -16,6 +16,8 @@ const Wrapper = styled.header` } `; +const LinkWrapper = styled.div``; + const LayoutWrapper = styled.div` width: 100%; height: 100%; @@ -57,12 +59,12 @@ const Header = (): React$Element => ( -
+ TREZOR Docs Blog Support -
+ ); diff --git a/src/js/components/common/Icon.js b/src/js/components/common/Icon.js new file mode 100644 index 00000000..213b2132 --- /dev/null +++ b/src/js/components/common/Icon.js @@ -0,0 +1,42 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +const Icon = (props) => { + const styles = { + svg: { + display: 'inline-block', + verticalAlign: 'middle', + }, + path: { + fill: props.color, + }, + }; + + return ( + + + + ); +}; + +Icon.propTypes = { + icon: PropTypes.string.isRequired, + size: PropTypes.number, + color: PropTypes.string, +}; + +Icon.defaultProps = { + size: 30, + color: 'black', +}; + +export default Icon; \ No newline at end of file diff --git a/src/js/components/common/LoaderCircle.js b/src/js/components/common/LoaderCircle.js index 5443c5d4..ba209cd8 100644 --- a/src/js/components/common/LoaderCircle.js +++ b/src/js/components/common/LoaderCircle.js @@ -1,6 +1,5 @@ /* @flow */ - import React from 'react'; export default (props: { size: string, label?: string, className?: string }): React$Element => { @@ -11,7 +10,7 @@ export default (props: { size: string, label?: string, className?: string }): Re }; return ( -
+

{ props.label }

diff --git a/src/js/components/landing/InstallBridge.js b/src/js/components/landing/InstallBridge.js index dc7f3e5d..0ab6a9c3 100644 --- a/src/js/components/landing/InstallBridge.js +++ b/src/js/components/landing/InstallBridge.js @@ -1,6 +1,6 @@ /* @flow */ - +import installers from '~/js/constants/bridge'; import React, { Component } from 'react'; import Select from 'react-select'; import Preloader from './Preloader'; @@ -17,15 +17,6 @@ type InstallTarget = { label: string; } -const installers: Array = [ - { id: 'Windows', value: 'trezor-bridge-2.0.11-win32-install.exe', label: 'Windows' }, - { id: 'macOS', value: 'trezor-bridge-2.0.11.pkg', label: 'Mac OS X' }, - { id: 'Linux', value: 'trezor-bridge_2.0.11_amd64.deb', label: 'Linux 64-bit (deb)' }, - { id: 'Linux-rpm', value: 'trezor-bridge_2.0.11_amd64.rpm', label: 'Linux 64-bit (rpm)' }, - { id: '01', value: 'trezor-bridge_2.0.11_amd32.deb', label: 'Linux 32-bit (deb)' }, - { id: '02', value: 'trezor-bridge_2.0.11_amd32.rpm', label: 'Linux 32-bit (rpm)' }, -]; - // import type { Props } from './index'; type Props = { diff --git a/src/js/components/wallet/pages/DeviceSettings.js b/src/js/components/wallet/pages/DeviceSettings.js index f1a55c3e..a02a2f62 100644 --- a/src/js/components/wallet/pages/DeviceSettings.js +++ b/src/js/components/wallet/pages/DeviceSettings.js @@ -1,15 +1,45 @@ import React from 'react'; +import styled from 'styled-components'; import { H2 } from '~/js/components/common/Heading'; +import Icon from '~/js/components/common/Icon'; +import colors from '~/js/config/colors'; +import ICONS from '~/js/constants/icons'; import { connect } from 'react-redux'; +const Section = styled.section` +`; + +const P = styled.p` + padding: 12px 0px 24px 0px; + text-align: center; +`; + +const StyledH2 = styled(H2)` + padding-top: 15px; +`; + +const Row = styled.div` + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 0px 48px; + padding-bottom: 98px; +`; + export const DeviceSettings = () => ( -
-
-

Device settings is under construction

-

Please use Bitcoin wallet interface to change your device settings

+
+ + + Device settings is under construction +

Please use Bitcoin wallet interface to change your device settings

Take me to the Bitcoin wallet -
- + + ); export default connect(null, null)(DeviceSettings); diff --git a/src/js/constants/bridge.js b/src/js/constants/bridge.js new file mode 100644 index 00000000..cfd8914d --- /dev/null +++ b/src/js/constants/bridge.js @@ -0,0 +1,8 @@ +export default [ + { id: 'Windows', value: 'trezor-bridge-2.0.11-win32-install.exe', label: 'Windows' }, + { id: 'macOS', value: 'trezor-bridge-2.0.11.pkg', label: 'Mac OS X' }, + { id: 'Linux', value: 'trezor-bridge_2.0.11_amd64.deb', label: 'Linux 64-bit (deb)' }, + { id: 'Linux-rpm', value: 'trezor-bridge_2.0.11_amd64.rpm', label: 'Linux 64-bit (rpm)' }, + { id: '01', value: 'trezor-bridge_2.0.11_amd32.deb', label: 'Linux 32-bit (deb)' }, + { id: '02', value: 'trezor-bridge_2.0.11_amd32.rpm', label: 'Linux 32-bit (rpm)' }, +]; diff --git a/src/js/constants/icons.js b/src/js/constants/icons.js new file mode 100644 index 00000000..bb2f7fa6 --- /dev/null +++ b/src/js/constants/icons.js @@ -0,0 +1,3 @@ +export default { + WARNING: 'M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z', +}; \ No newline at end of file diff --git a/src/js/utils/networkUtils.js b/src/js/utils/networkUtils.js index 546ceff2..360168d9 100644 --- a/src/js/utils/networkUtils.js +++ b/src/js/utils/networkUtils.js @@ -10,9 +10,9 @@ export const httpRequest = async (url: string, type: string = 'text'): any => { const txt: string = await response.text(); return JSON.parse(txt); } if (type === 'binary') { - return await response.arrayBuffer(); + await response.arrayBuffer(); } - return await response.text(); + await response.text(); } throw new Error(`${url} ${response.statusText}`); diff --git a/src/styles/content.less b/src/styles/content.less index f203e483..6e68ec81 100644 --- a/src/styles/content.less +++ b/src/styles/content.less @@ -59,12 +59,6 @@ article { display: flex; flex-direction: column; background: @color_white; - - h2 { - font-size: 16px; - font-weight: 600; - padding: 24px 48px; - } p { padding: 0px 48px; diff --git a/src/styles/deviceSettings.less b/src/styles/deviceSettings.less deleted file mode 100644 index 0f26d5f5..00000000 --- a/src/styles/deviceSettings.less +++ /dev/null @@ -1,32 +0,0 @@ -.device-settings { - .row { - flex: 1; - - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - padding: 0px 48px; - padding-bottom: 98px; - - h2 { - padding: 0; - position: relative; - &:before { - .icomoon-warning; - position: absolute; - color: @color_warning_primary; - font-size: 48px; - top: -48px; - left: 0; - right: 0; - text-align: center; - } - } - - p { - padding: 12px 0px 24px 0px; - text-align: center; - } - } -} \ No newline at end of file diff --git a/src/styles/index.less b/src/styles/index.less index 23b95022..d50a8bab 100644 --- a/src/styles/index.less +++ b/src/styles/index.less @@ -14,7 +14,6 @@ @import './send.less'; @import './receive.less'; @import './summary.less'; -@import './deviceSettings.less'; @import './landingPage.less'; diff --git a/src/styles/landingPage.less b/src/styles/landingPage.less index 69614a38..8223e8ff 100644 --- a/src/styles/landingPage.less +++ b/src/styles/landingPage.less @@ -169,11 +169,6 @@ main { - h2.claim { - font-size: 36px; - padding-bottom: 24px; - } - .row { display: flex; flex-direction: row;