|
|
@ -11,6 +11,7 @@ import Notifications, { Notification } from 'components/Notification';
|
|
|
|
import colors from 'config/colors';
|
|
|
|
import colors from 'config/colors';
|
|
|
|
import P from 'components/Paragraph';
|
|
|
|
import P from 'components/Paragraph';
|
|
|
|
import { H2 } from 'components/Heading';
|
|
|
|
import { H2 } from 'components/Heading';
|
|
|
|
|
|
|
|
import { isWebUSB } from 'utils/device';
|
|
|
|
|
|
|
|
|
|
|
|
import BrowserNotSupported from './components/BrowserNotSupported';
|
|
|
|
import BrowserNotSupported from './components/BrowserNotSupported';
|
|
|
|
import ConnectDevice from './components/ConnectDevice';
|
|
|
|
import ConnectDevice from './components/ConnectDevice';
|
|
|
@ -72,7 +73,6 @@ export default (props: Props) => {
|
|
|
|
const bridgeRoute: boolean = props.router.location.state.hasOwnProperty('bridge');
|
|
|
|
const bridgeRoute: boolean = props.router.location.state.hasOwnProperty('bridge');
|
|
|
|
const deviceLabel = props.wallet.disconnectRequest ? props.wallet.disconnectRequest.label : '';
|
|
|
|
const deviceLabel = props.wallet.disconnectRequest ? props.wallet.disconnectRequest.label : '';
|
|
|
|
|
|
|
|
|
|
|
|
const hasWebUsb = transport && transport.version.indexOf('webusb') >= 0;
|
|
|
|
|
|
|
|
const shouldShowInstallBridge = connectError || bridgeRoute;
|
|
|
|
const shouldShowInstallBridge = connectError || bridgeRoute;
|
|
|
|
const shouldShowConnectDevice = props.wallet.ready && devices.length < 1;
|
|
|
|
const shouldShowConnectDevice = props.wallet.ready && devices.length < 1;
|
|
|
|
const shouldShowDisconnectDevice = !!props.wallet.disconnectRequest;
|
|
|
|
const shouldShowDisconnectDevice = !!props.wallet.disconnectRequest;
|
|
|
@ -111,7 +111,7 @@ export default (props: Props) => {
|
|
|
|
|
|
|
|
|
|
|
|
<ConnectDevice
|
|
|
|
<ConnectDevice
|
|
|
|
deviceLabel={deviceLabel}
|
|
|
|
deviceLabel={deviceLabel}
|
|
|
|
showWebUsb={hasWebUsb}
|
|
|
|
showWebUsb={isWebUSB(transport)}
|
|
|
|
showDisconnect={shouldShowDisconnectDevice}
|
|
|
|
showDisconnect={shouldShowDisconnectDevice}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
@ -119,7 +119,7 @@ export default (props: Props) => {
|
|
|
|
|
|
|
|
|
|
|
|
{shouldShowConnectDevice && (
|
|
|
|
{shouldShowConnectDevice && (
|
|
|
|
<LandingFooterWrapper>
|
|
|
|
<LandingFooterWrapper>
|
|
|
|
{hasWebUsb && (
|
|
|
|
{isWebUSB(transport) && (
|
|
|
|
<P>
|
|
|
|
<P>
|
|
|
|
<LandingFooterTextWrapper>
|
|
|
|
<LandingFooterTextWrapper>
|
|
|
|
Device not recognized?
|
|
|
|
Device not recognized?
|
|
|
|