Remove html background

This commit is contained in:
Jaco Greeff 2017-04-24 10:05:45 +02:00
parent a2269a477e
commit bc0ea154df
2 changed files with 25 additions and 28 deletions

View File

@ -31,19 +31,19 @@ export default class UpgradeParity extends Component {
}; };
static propTypes = { static propTypes = {
store: PropTypes.object.isRequired upgradeStore: PropTypes.object.isRequired
} }
render () { render () {
const { store } = this.props; const { upgradeStore } = this.props;
if (!store.isVisible) { if (!upgradeStore.isVisible) {
return null; return null;
} }
return ( return (
<Portal <Portal
activeStep={ store.step } activeStep={ upgradeStore.step }
busySteps={ [ 1 ] } busySteps={ [ 1 ] }
buttons={ this.renderActions() } buttons={ this.renderActions() }
onClose={ this.onClose } onClose={ this.onClose }
@ -59,7 +59,7 @@ export default class UpgradeParity extends Component {
id='upgradeParity.step.updating' id='upgradeParity.step.updating'
defaultMessage='upgrading parity' defaultMessage='upgrading parity'
/>, />,
store.error upgradeStore.error
? <FormattedMessage ? <FormattedMessage
id='upgradeParity.step.error' id='upgradeParity.step.error'
key='error' key='error'
@ -78,7 +78,7 @@ export default class UpgradeParity extends Component {
} }
renderActions () { renderActions () {
const { store } = this.props; const { upgradeStore } = this.props;
const closeButton = const closeButton =
<Button <Button
@ -105,7 +105,7 @@ export default class UpgradeParity extends Component {
onClick={ this.onDone } onClick={ this.onDone }
/>; />;
switch (store.step) { switch (upgradeStore.step) {
case STEP_INFO: case STEP_INFO:
return [ return [
<Button <Button
@ -136,13 +136,13 @@ export default class UpgradeParity extends Component {
} }
renderStep () { renderStep () {
const { store } = this.props; const { upgradeStore } = this.props;
const currentversion = this.formatVersion(store); const currentversion = this.formatVersion(upgradeStore);
const newversion = store.upgrading const newversion = upgradeStore.upgrading
? this.formatVersion(store.upgrading) ? this.formatVersion(upgradeStore.upgrading)
: this.formatVersion(store.available); : this.formatVersion(upgradeStore.available);
switch (store.step) { switch (upgradeStore.step) {
case STEP_INFO: case STEP_INFO:
return this.renderStepInfo(newversion, currentversion); return this.renderStepInfo(newversion, currentversion);
@ -151,7 +151,7 @@ export default class UpgradeParity extends Component {
case STEP_COMPLETED: case STEP_COMPLETED:
case STEP_ERROR: case STEP_ERROR:
return store.error return upgradeStore.error
? this.renderStepError(newversion) ? this.renderStepError(newversion)
: this.renderStepCompleted(newversion); : this.renderStepCompleted(newversion);
} }
@ -192,7 +192,7 @@ export default class UpgradeParity extends Component {
} }
renderStepError (newversion) { renderStepError (newversion) {
const { store } = this.props; const { upgradeStore } = this.props;
return ( return (
<div className={ styles.step }> <div className={ styles.step }>
@ -206,7 +206,7 @@ export default class UpgradeParity extends Component {
} } } }
/> />
<div className={ styles.error }> <div className={ styles.error }>
{ store.error.message } { upgradeStore.error.message }
</div> </div>
</div> </div>
</div> </div>
@ -262,8 +262,8 @@ export default class UpgradeParity extends Component {
} }
renderConsensusInfo () { renderConsensusInfo () {
const { store } = this.props; const { upgradeStore } = this.props;
const { consensusCapability } = store; const { consensusCapability } = upgradeStore;
if (consensusCapability) { if (consensusCapability) {
if (consensusCapability === 'capable') { if (consensusCapability === 'capable') {
@ -320,11 +320,11 @@ export default class UpgradeParity extends Component {
} }
onClose = () => { onClose = () => {
this.props.store.closeModal(); this.props.upgradeStore.closeModal();
} }
onDone = () => { onDone = () => {
if (this.props.store.error) { if (this.props.upgradeStore.error) {
this.onClose(); this.onClose();
} else { } else {
window.location.reload(); window.location.reload();
@ -332,6 +332,6 @@ export default class UpgradeParity extends Component {
} }
onUpgrade = () => { onUpgrade = () => {
this.props.store.upgradeNow(); this.props.upgradeStore.upgradeNow();
} }
} }

View File

@ -17,7 +17,7 @@
import React, { Component, PropTypes } from 'react'; import React, { Component, PropTypes } from 'react';
import { FirstRun, UpgradeParity } from '~/modals'; import { FirstRun, UpgradeParity } from '~/modals';
import { Errors, ParityBackground, Tooltips } from '~/ui'; import { Errors, Tooltips } from '~/ui';
import styles from '../application.css'; import styles from '../application.css';
@ -33,19 +33,16 @@ export default class Container extends Component {
const { children, onCloseFirstRun, showFirstRun, upgradeStore } = this.props; const { children, onCloseFirstRun, showFirstRun, upgradeStore } = this.props;
return ( return (
<ParityBackground <div className={ styles.container }>
attachDocument
className={ styles.container }
>
<FirstRun <FirstRun
onClose={ onCloseFirstRun } onClose={ onCloseFirstRun }
visible={ showFirstRun } visible={ showFirstRun }
/> />
<Tooltips /> <Tooltips />
<UpgradeParity store={ upgradeStore } /> <UpgradeParity upgradeStore={ upgradeStore } />
<Errors /> <Errors />
{ children } { children }
</ParityBackground> </div>
); );
} }
} }