diff --git a/src/js/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js b/src/js/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js index 79ed2025..dc3b2e79 100644 --- a/src/js/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js +++ b/src/js/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js @@ -3,7 +3,7 @@ import React, { Component } from 'react'; import styled from 'styled-components'; import TrezorConnect from 'trezor-connect'; import type { TrezorDevice } from 'flowtype'; -import { getStatus, getVersion } from 'utils/device'; +import { getStatus, getVersion, isDisabled } from 'utils/device'; import DeviceHeader from './components/DeviceHeader'; @@ -12,15 +12,13 @@ import type { Props } from '../common'; import AsideDivider from '../Divider'; - const Wrapper = styled.div``; export const DeviceSelect = (props: Props) => { const { devices } = props; const { transport } = props.connect; const { selectedDevice } = props.wallet; - const webusb: boolean = !!((transport && transport.version.indexOf('webusb') >= 0)); - const disabled: boolean = (devices.length < 1 && !webusb) || (devices.length === 1 && !selectedDevice.features && !webusb); + const disabled = isDisabled(selectedDevice, devices, transport); const handleOpen = () => { props.toggleDeviceDropdown(!props.deviceDropdownOpened); diff --git a/src/js/views/Wallet/views/Acquire/index.js b/src/js/views/Wallet/views/Acquire/index.js index bd5f8a90..b097c93d 100644 --- a/src/js/views/Wallet/views/Acquire/index.js +++ b/src/js/views/Wallet/views/Acquire/index.js @@ -1,7 +1,9 @@ /* @flow */ import React from 'react'; +import styled from 'styled-components'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; +import colors from 'config/colors'; import { Notification } from 'components/Notification'; import * as TrezorConnectActions from 'actions/TrezorConnectActions'; @@ -12,6 +14,13 @@ type Props = { acquireDevice: typeof TrezorConnectActions.acquire } +const Wrapper = styled.div` + display: flex; + background: ${colors.WHITE}; + flex-direction: column; + flex: 1; +`; + const Acquire = (props: Props) => { const actions = props.acquiring ? [] : [ { @@ -23,7 +32,7 @@ const Acquire = (props: Props) => { ]; return ( -
+ { cancelable={false} actions={actions} /> -
+ ); }; diff --git a/src/styles/acquire.less b/src/styles/acquire.less deleted file mode 100644 index 39db34ee..00000000 --- a/src/styles/acquire.less +++ /dev/null @@ -1,41 +0,0 @@ -.acquire { - flex: 1; - display: flex; - flex-direction: column; - background: @color_white; - - .warning { - background: @color_info_secondary; - display: flex; - flex-direction: row; - padding: 26px 39px 26px 80px; - - div { - flex: 1; - position: relative; - } - - h2 { - color: @color_info_primary; - font-size: 14px; - -webkit-font-smoothing: auto; - margin-bottom: 5px; - padding: 0px; - - &:before { - .icomoon-info; - position: absolute; - top: -7px; - left: -32px; - font-size: 32px; - } - } - - p { - color: @color_info_primary; - font-size: 12px; - padding: 0px; - } - - } -} \ No newline at end of file diff --git a/src/styles/index.less b/src/styles/index.less index 6d53061f..b082d0fd 100644 --- a/src/styles/index.less +++ b/src/styles/index.less @@ -13,8 +13,6 @@ @import './summary.less'; @import './landingPage.less'; - -@import './acquire.less'; @import './notification.less'; @import './inputs.less';