Browse Source
# Conflicts: # react/src/components/dashboard/walletsBalance/walletsBalance.js # react/src/components/dashboard/walletsData/walletsData.js # react/src/components/dashboard/walletsData/walletsData.render.jsall-modes
petitPapillon
8 years ago
68 changed files with 669 additions and 312 deletions
@ -0,0 +1,47 @@ |
|||||
|
import React from 'react'; |
||||
|
import { toggleCoindDownModal } from '../../../actions/actionCreators'; |
||||
|
import Store from '../../../store'; |
||||
|
|
||||
|
import CoindDownModalRender from './coindDownModal.render'; |
||||
|
|
||||
|
class CoindDownModal extends React.Component { |
||||
|
constructor(props) { |
||||
|
super(props); |
||||
|
this.state = { |
||||
|
display: false, |
||||
|
debugLogCrash: null, |
||||
|
}; |
||||
|
this.dismiss = this.dismiss.bind(this); |
||||
|
} |
||||
|
|
||||
|
dismiss() { |
||||
|
Store.dispatch(toggleCoindDownModal(false)); |
||||
|
} |
||||
|
|
||||
|
componentWillReceiveProps(props) { |
||||
|
const coindDownModalProps = props ? props.Dashboard : null; |
||||
|
|
||||
|
if (coindDownModalProps && |
||||
|
coindDownModalProps.displayCoindDownModal !== this.state.display) { |
||||
|
this.setState(Object.assign({}, this.state, { |
||||
|
display: coindDownModalProps.displayCoindDownModal, |
||||
|
})); |
||||
|
|
||||
|
setTimeout(() => { |
||||
|
this.setState(Object.assign({}, this.state, { |
||||
|
display: coindDownModalProps.displayCoindDownModal, |
||||
|
})); |
||||
|
}, 100); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
render() { |
||||
|
if (this.state.display) { |
||||
|
return CoindDownModalRender.call(this); |
||||
|
} |
||||
|
|
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
export default CoindDownModal; |
@ -0,0 +1,46 @@ |
|||||
|
import React from 'react'; |
||||
|
import { translate } from '../../../translate/translate'; |
||||
|
|
||||
|
const CoindDownModalRender = function () { |
||||
|
return ( |
||||
|
<div> |
||||
|
<div |
||||
|
className={ 'modal modal-3d-sign coind-down-modal ' + (this.state.display ? 'show in' : 'fade hide') } |
||||
|
id="AddCoinDilogModel-login"> |
||||
|
<div className="modal-dialog modal-center modal-lg"> |
||||
|
<div className="modal-content"> |
||||
|
<div className="modal-header bg-orange-a400 wallet-send-header"> |
||||
|
<button |
||||
|
type="button" |
||||
|
className="close white" |
||||
|
onClick={ this.dismiss }> |
||||
|
<span>×</span> |
||||
|
</button> |
||||
|
<h4 className="modal-title white">Komodod is down!</h4> |
||||
|
</div> |
||||
|
<div className="modal-body"> |
||||
|
<div className="vertical-align text-center"> |
||||
|
<div className="page-content vertical-align-middle"> |
||||
|
<strong>Debug.log (last 50 lines)</strong> |
||||
|
<div className="form-group form-material floating"> |
||||
|
<textarea |
||||
|
className="form-control" |
||||
|
value={ this.props.Settings.debugLog }></textarea> |
||||
|
</div> |
||||
|
<button |
||||
|
type="button" |
||||
|
className="btn btn-primary btn-block" |
||||
|
id="loginbtn" |
||||
|
onClick={ this.dismiss }>OK</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div className={ 'modal-backdrop ' + (this.state.display ? 'show in' : 'fade hide') }></div> |
||||
|
</div> |
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
export default CoindDownModalRender; |
Loading…
Reference in new issue