pbca26
8 years ago
committed by
GitHub
18 changed files with 378 additions and 122 deletions
@ -0,0 +1,32 @@ |
|||
import React from 'react'; |
|||
import { getCoinTitle } from '../../../util/coinHelper'; |
|||
import { translate } from '../../../translate/translate'; |
|||
import { toggleLoginSettingsModal } from '../../../actions/actionCreators'; |
|||
import Store from '../../../store'; |
|||
|
|||
import { LoginSettingsModalRender } from './loginSettingsModal.render'; |
|||
|
|||
class LoginSettingsModal extends React.Component { |
|||
constructor(props) { |
|||
super(props); |
|||
this.state = { |
|||
}; |
|||
this.closeLoginSettingsModal = this.closeLoginSettingsModal.bind(this); |
|||
} |
|||
|
|||
closeLoginSettingsModal() { |
|||
Store.dispatch(toggleLoginSettingsModal(false)); |
|||
} |
|||
|
|||
render() { |
|||
if (this.props && |
|||
this.props.Main && |
|||
this.props.Main.displayLoginSettingsModal) { |
|||
return LoginSettingsModalRender.call(this); |
|||
} else { |
|||
return null; |
|||
} |
|||
} |
|||
} |
|||
|
|||
export default LoginSettingsModal; |
@ -0,0 +1,34 @@ |
|||
import React from 'react'; |
|||
import { translate } from '../../../translate/translate'; |
|||
import About from '../about/about'; |
|||
import Settings from '../settings/settings'; |
|||
|
|||
export const LoginSettingsModalRender = function() { |
|||
return ( |
|||
<div> |
|||
<div className="modal show login-settings-modal"> |
|||
<div className="modal-dialog modal-center modal-lg"> |
|||
<div className="modal-content"> |
|||
<div className="modal-body modal-body-container"> |
|||
{ this.props.section === 'settings' && |
|||
<Settings |
|||
{...this.props} |
|||
disableWalletSpecificUI="true" /> |
|||
} |
|||
{ this.props.section === 'about' && |
|||
<About /> |
|||
} |
|||
</div> |
|||
<div className="modal-footer"> |
|||
<button |
|||
type="button" |
|||
className="btn btn-default" |
|||
onClick={ this.closeLoginSettingsModal }>{ translate('INDEX.CLOSE') }</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div className="modal-backdrop show in"></div> |
|||
</div> |
|||
); |
|||
}; |
Loading…
Reference in new issue