mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
Added one more status for device
This commit is contained in:
parent
2c5ec70a02
commit
8a0591bfd5
@ -29,6 +29,9 @@ const getStatusName = (deviceStatus) => {
|
||||
case 'disconnected':
|
||||
statusName = 'Disconnected';
|
||||
break;
|
||||
case 'unacquired':
|
||||
statusName = 'Used in other window';
|
||||
break;
|
||||
case 'unavailable':
|
||||
statusName = 'Unavailable';
|
||||
break;
|
||||
@ -61,6 +64,9 @@ const getStatusColor = (deviceStatus) => {
|
||||
case 'connected':
|
||||
color = colors.GREEN_PRIMARY;
|
||||
break;
|
||||
case 'unacquired':
|
||||
color = colors.WARNING_PRIMARY;
|
||||
break;
|
||||
case 'disconnected':
|
||||
color = colors.ERROR_PRIMARY;
|
||||
break;
|
||||
|
@ -17,16 +17,11 @@ const Wrapper = styled.div`
|
||||
background: ${colors.WHITE};
|
||||
border-bottom: 1px solid ${colors.DIVIDER};
|
||||
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
|
||||
cursor: pointer;
|
||||
|
||||
${props => props.isOpen && css`
|
||||
border-bottom: 1px solid ${colors.WHITE};
|
||||
box-shadow: none;
|
||||
`}
|
||||
|
||||
${props => props.disabled && css`
|
||||
cursor: initial;
|
||||
`}
|
||||
`;
|
||||
|
||||
const ClickWrapper = styled.div`
|
||||
@ -119,11 +114,11 @@ class DeviceHeader extends Component {
|
||||
status, label, deviceCount, isOpen, trezorModel, disabled,
|
||||
} = this.props;
|
||||
return (
|
||||
<Wrapper isOpen={isOpen} disabled={disabled}>
|
||||
<Wrapper isOpen={isOpen}>
|
||||
<ClickWrapper disabled={disabled} onClick={() => this.handleClick()}>
|
||||
<ImageWrapper>
|
||||
<Dot color={getStatusColor(status)} />
|
||||
<TrezorImage status={status} model={trezorModel} />
|
||||
<TrezorImage model={trezorModel} />
|
||||
</ImageWrapper>
|
||||
<LabelWrapper>
|
||||
<Name>{label}</Name>
|
||||
|
Loading…
Reference in New Issue
Block a user