Commit b6a6b7fa authored by Ray Schamp's avatar Ray Schamp

WIP

parent 429aa035
...@@ -8,7 +8,12 @@ require('./modal.scss'); ...@@ -8,7 +8,12 @@ require('./modal.scss');
var Modal = React.createClass({ var Modal = React.createClass({
type: 'Modal', type: 'Modal',
statics: { statics: {
setAppElement: ReactModal.setAppElement setAppElement: ReactModal.setAppElement,
defaultFrameSettings: {
width: 500,
height: 250,
padding: 0
}
}, },
getDefaultProps: function () { getDefaultProps: function () {
return { return {
...@@ -33,11 +38,7 @@ var Modal = React.createClass({ ...@@ -33,11 +38,7 @@ var Modal = React.createClass({
var style = this.props.style; var style = this.props.style;
var modalProps = omit(this.props, ['frameSettings', 'style']); var modalProps = omit(this.props, ['frameSettings', 'style']);
if (frameSettings) { if (frameSettings) {
defaults(frameSettings, { defaults(frameSettings, Modal.defaultFrameSettings);
width: 500,
height: 250,
padding: 0
});
defaults(style.content, { defaults(style.content, {
top: '50%', top: '50%',
right: 'auto', right: 'auto',
......
var injectIntl = require('react-intl').injectIntl; var injectIntl = require('react-intl').injectIntl;
var omit = require('lodash.omit');
var React = require('react'); var React = require('react');
var render = require('../../lib/render.jsx'); var render = require('../../lib/render.jsx');
...@@ -12,6 +13,7 @@ var Box = require('../../components/box/box.jsx'); ...@@ -12,6 +13,7 @@ var Box = require('../../components/box/box.jsx');
var Button = require('../../components/forms/button.jsx'); var Button = require('../../components/forms/button.jsx');
var Carousel = require('../../components/carousel/carousel.jsx'); var Carousel = require('../../components/carousel/carousel.jsx');
var Intro = require('../../components/intro/intro.jsx'); var Intro = require('../../components/intro/intro.jsx');
var Modal = require('../../components/modal/modal.jsx');
var News = require('../../components/news/news.jsx'); var News = require('../../components/news/news.jsx');
var Welcome = require('../../components/welcome/welcome.jsx'); var Welcome = require('../../components/welcome/welcome.jsx');
...@@ -29,7 +31,8 @@ var Splash = injectIntl(React.createClass({ ...@@ -29,7 +31,8 @@ var Splash = injectIntl(React.createClass({
activity: [], activity: [],
news: [], news: [],
featuredCustom: {}, featuredCustom: {},
featuredGlobal: {} featuredGlobal: {},
showEmailConfirmationModal: false
}; };
}, },
componentDidUpdate: function (prevProps, prevState) { componentDidUpdate: function (prevProps, prevState) {
...@@ -89,6 +92,12 @@ var Splash = injectIntl(React.createClass({ ...@@ -89,6 +92,12 @@ var Splash = injectIntl(React.createClass({
if (!err) this.setState({projectCount: body.count}); if (!err) this.setState({projectCount: body.count});
}.bind(this)); }.bind(this));
}, },
showEmailConfirmationModal: function () {
this.setState({showEmailConfirmationModal: true});
},
hideEmailConfirmationModal: function () {
this.setState({showEmailConfirmationModal: false});
},
handleDismiss: function (cue) { handleDismiss: function (cue) {
this.api({ this.api({
host: '', host: '',
...@@ -245,9 +254,18 @@ var Splash = injectIntl(React.createClass({ ...@@ -245,9 +254,18 @@ var Splash = injectIntl(React.createClass({
<Banner key="confirmedEmail" <Banner key="confirmedEmail"
className="warning" className="warning"
onRequestDismiss={this.handleDismiss.bind(this, 'confirmed_email')}> onRequestDismiss={this.handleDismiss.bind(this, 'confirmed_email')}>
<a href="#" onClick={this.showConfirmEmailPopup}>Confirm your email</a> to enable sharing.{' '} <a href="#" onClick={this.showEmailConfirmationModal}>Confirm your email</a>
to enable sharing.{' '}
<a href="/info/faq/#accounts">Having trouble?</a> <a href="/info/faq/#accounts">Having trouble?</a>
</Banner> </Banner>,
<Modal key="emailConfirmationModal"
isOpen={this.showEmailConfirmationModal}
onRequestClose={this.hideEmailConfirmationModal}
frameSettings={Modal.defaultFrameSettings}>
<iframe
src="/accounts/email_resend/"
{...omit(Modal.defaultFrameSettings, 'padding')} />
</Modal>
] : []} ] : []}
<div key="inner" className="inner"> <div key="inner" className="inner">
{this.state.session.user ? [ {this.state.session.user ? [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment