|
|
@ -1,7 +1,7 @@ |
|
|
|
import React, { PureComponent } from 'react' |
|
|
|
import React, { PureComponent } from 'react' |
|
|
|
import PropTypes from 'prop-types' |
|
|
|
import PropTypes from 'prop-types' |
|
|
|
import Spinner from '../../ui/spinner' |
|
|
|
|
|
|
|
import Button from '../../ui/button' |
|
|
|
import Button from '../../ui/button' |
|
|
|
|
|
|
|
import LoadingScreen from '../../ui/loading-screen' |
|
|
|
|
|
|
|
|
|
|
|
export default class LoadingNetworkScreen extends PureComponent { |
|
|
|
export default class LoadingNetworkScreen extends PureComponent { |
|
|
|
state = { |
|
|
|
state = { |
|
|
@ -56,19 +56,6 @@ export default class LoadingNetworkScreen extends PureComponent { |
|
|
|
return name |
|
|
|
return name |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
renderMessage = () => { |
|
|
|
|
|
|
|
return <span>{ this.getConnectingLabel(this.props.loadingMessage) }</span> |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
renderLoadingScreenContent = () => { |
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
<div className="loading-overlay__screen-content"> |
|
|
|
|
|
|
|
<Spinner color="#F7C06C" /> |
|
|
|
|
|
|
|
{this.renderMessage()} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
renderErrorScreenContent = () => { |
|
|
|
renderErrorScreenContent = () => { |
|
|
|
const { showNetworkDropdown, setProviderArgs, setProviderType } = this.props |
|
|
|
const { showNetworkDropdown, setProviderArgs, setProviderType } = this.props |
|
|
|
|
|
|
|
|
|
|
@ -129,18 +116,16 @@ export default class LoadingNetworkScreen extends PureComponent { |
|
|
|
const { lastSelectedProvider, setProviderType } = this.props |
|
|
|
const { lastSelectedProvider, setProviderType } = this.props |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="loading-overlay"> |
|
|
|
<LoadingScreen |
|
|
|
<div |
|
|
|
header={( |
|
|
|
className="page-container__header-close" |
|
|
|
<div |
|
|
|
onClick={() => setProviderType(lastSelectedProvider || 'ropsten')} |
|
|
|
className="page-container__header-close" |
|
|
|
/> |
|
|
|
onClick={() => setProviderType(lastSelectedProvider || 'ropsten')} |
|
|
|
<div className="loading-overlay__container"> |
|
|
|
/> |
|
|
|
{ this.state.showErrorScreen |
|
|
|
)} |
|
|
|
? this.renderErrorScreenContent() |
|
|
|
showLoadingSpinner={!this.state.showErrorScreen} |
|
|
|
: this.renderLoadingScreenContent() |
|
|
|
loadingMessage={this.state.showErrorScreen ? this.renderErrorScreenContent() : this.getConnectingLabel(this.props.loadingMessage)} |
|
|
|
} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|