diff --git a/client/app/components/App/app.scss b/client/app/components/App/app.scss index f5a386cc..2a1de019 100755 --- a/client/app/components/App/app.scss +++ b/client/app/components/App/app.scss @@ -140,7 +140,6 @@ h1 { .page { padding: 0em 2em; - word-break: break-all; } .card { @@ -180,7 +179,6 @@ button { } a, a:hover, a:focus, a:active a:visited{ - color: $text-color; text-decoration: none; } diff --git a/client/app/components/FacebookTwitterButtons/FacebookTwitterButtons.js b/client/app/components/FacebookTwitterButtons/FacebookTwitterButtons.js index b85a6afb..62b5b313 100644 --- a/client/app/components/FacebookTwitterButtons/FacebookTwitterButtons.js +++ b/client/app/components/FacebookTwitterButtons/FacebookTwitterButtons.js @@ -7,15 +7,6 @@ import { getAuthUrl, waitForTwitterCallback, fetchFacebookAppId } from '../../ac import { postFacebookResponseToServer } from '../../utils/apiRequests'; -const propTypes = { - dispatch: PropTypes.func.isRequired, - twitter_data: PropTypes.object.isRequired, - facebookConnected: PropTypes.bool, - twitterConnected: PropTypes.bool, - auth: PropTypes.object, - // onFinish: PropTypes.func.isRequired, -}; - const MAX_POLLS = 120; class FacebookTwitterButtons extends Component { @@ -29,9 +20,6 @@ class FacebookTwitterButtons extends Component { polling: false, pollCount: 0, }; - this.responseFacebook = this.responseFacebook.bind(this); - this.onTwitterButtonClick = this.onTwitterButtonClick.bind(this); - this.facebookAppId = ''; } componentWillMount() { @@ -43,7 +31,6 @@ class FacebookTwitterButtons extends Component { nextProps.twitter_data.oauth_url != null) { if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { // redirect to twitter auth - console.log(nextProps.twitter_data.oauth_url); window.location.replace(nextProps.twitter_data.oauth_url); } else { window.open(nextProps.twitter_data.oauth_url, '_blank', 'width=500,height=500'); @@ -64,62 +51,31 @@ class FacebookTwitterButtons extends Component { clearTimeout(this.timeout); } - onTwitterButtonClick() { + onTwitterButtonClick = () => { this.props.dispatch(getAuthUrl()); this.startPoll(); this.setState({ polling: true }); } - startPoll() { - if (this.state.pollCount > MAX_POLLS) { - this.setState({ twitterError: true }); - } else { - this.timeout = setTimeout(() => this.props.dispatch(waitForTwitterCallback()), 1000); - this.setState({ pollCount: this.state.pollCount + 1 }); - } - } - - responseFacebook(response) { - console.log(response); - if ('name' in response) { - this.setState({ facebookSuccess: true }); - // dispatch response to server - postFacebookResponseToServer(response); - } - this.isDone(); - } - isDone() { - if (this.state.facebookSuccess && this.state.twitterSuccess) { - // this.props.onFinish() + getConnectButtonClass = (success) => { + let buttonClass = 'button button_wide '; + if (success) { + buttonClass += 'disabled'; } + return buttonClass; } - render() { - let facebookButtonClass = 'button button_wide '; - let twitterButtonClass = 'button button_wide '; + getButtonDefaults = (success, platformName) => ({ + buttonClass: this.getConnectButtonClass(success), + buttonText: success ? `${platformName} Connected` : `Connect your ${platformName}`, + buttonIcon: success ? 'icon-tick' : '', + }) - if (this.state.facebookSuccess) { - facebookButtonClass += 'disabled'; - } - - if (this.state.twitterSuccess) { - twitterButtonClass += 'disabled'; - } - const successIcon = 'icon-tick'; - const addIcon = 'icon-plus'; - - const FBIcon = this.state.facebookSuccess ? successIcon : addIcon; - const twitterIcon = this.state.twitterSuccess ? successIcon : addIcon; - - const facebookButtonText = this.state.facebookSuccess ? 'Facebook Connected' : 'Connect your Facebook'; - let twitterButtonText = this.state.twitterSuccess ? 'Twitter Connected' : 'Connect your Twitter'; - if (this.state.twitterError) { - twitterButtonText = 'Error authenticating twitter. Please try again '; - } - let fbButton; - if (this.props.twitter_data.isFacebookEnabled && this.props.twitter_data.facebookAppId) { - fbButton = ( + getFacebookButton = () => { + const buttonProps = this.getButtonDefaults(this.state.facebookSuccess, 'Facebook'); + return ( +
Connect to Facebook to allow Gobo to read Facebook pages that you like. Gobo displays public posts from liked pages for you to filter. Unfortunately we cannot display posts on your feed from your friends.
+Connect to Twitter to allow Gobo to read tweets from your timeline. Gobo displays up to 500 of the most recent posts from your feed for you to filter.
+Don't have an account yet?
+Don't have an account yet?
diff --git a/client/app/components/Profile/Profile.js b/client/app/components/Profile/Profile.js
index d5b73368..39803acd 100644
--- a/client/app/components/Profile/Profile.js
+++ b/client/app/components/Profile/Profile.js
@@ -19,9 +19,7 @@ const Profile = (props) => {
if (!props.auth.isAuthenticated) {
return
Twitter: {`@${user.twitter_name}`} @@ -43,7 +41,7 @@ const Profile = (props) => { ); } else { twitterContent = ( -
Twitter: Not Connected
@@ -52,16 +50,16 @@ const Profile = (props) => { } if (user.facebook_authorized) { facebookContent = ( -Facebook: - {user.facebook_name} + {user.facebook_name}
Facebook: Not Connected
@@ -69,11 +67,11 @@ const Profile = (props) => { ); } return ( -See our privacy policy for more information.
+
You are all set to start using Gobo!
Go ahead and check out your feed
diff --git a/client/app/components/Register/registerSteps/SelectPersona.js b/client/app/components/Register/registerSteps/SelectPersona.js
index 09090bc5..0fe6af35 100644
--- a/client/app/components/Register/registerSteps/SelectPersona.js
+++ b/client/app/components/Register/registerSteps/SelectPersona.js
@@ -22,7 +22,7 @@ class SelectPersona extends Component {
render() {
return (
+
To tailor your feed, tell us a little about what type of news you read.
Scan the names of popular news sites below and click on the one you read most.
diff --git a/client/app/components/Register/registerSteps/SignupEmailPassword.js b/client/app/components/Register/registerSteps/SignupEmailPassword.js
index 49a06cee..389f9803 100644
--- a/client/app/components/Register/registerSteps/SignupEmailPassword.js
+++ b/client/app/components/Register/registerSteps/SignupEmailPassword.js
@@ -44,8 +44,6 @@ class SignupEmailPassword extends Component {
&& this.refs.password.isValid()
&& this.refs.passwordConfirm.isValid();
- // console.log(canProceed, this.refs.password.isValid(), this.refs.passwordConfirm.isValid());
-
if (canProceed) {
this.props.dispatch(registerUser(this.state.email, this.state.password));
} else {
@@ -84,11 +82,8 @@ class SignupEmailPassword extends Component {
render() {
return (