1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +00:00

Removed more styles

This commit is contained in:
Vladimir Volek 2018-08-23 12:22:00 +02:00
parent 8a0591bfd5
commit 9ce0975507
4 changed files with 13 additions and 49 deletions

View File

@ -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);

View File

@ -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 (
<section className="acquire">
<Wrapper>
<Notification
title="Device is used in other window"
message="Do you want to use your device in this window?"
@ -31,7 +40,7 @@ const Acquire = (props: Props) => {
cancelable={false}
actions={actions}
/>
</section>
</Wrapper>
);
};

View File

@ -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;
}
}
}

View File

@ -13,8 +13,6 @@
@import './summary.less';
@import './landingPage.less';
@import './acquire.less';
@import './notification.less';
@import './inputs.less';