From 82a43287000c7a6079cb577e72f6d606fbd315b2 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 10 Apr 2020 19:03:06 -0500 Subject: [PATCH] Login through homepage working --- app/gabsocial/features/auth_login/index.js | 32 ++++++++++---------- app/gabsocial/features/landing_page/index.js | 18 ++--------- app/styles/gabsocial/forms.scss | 11 +++++++ 3 files changed, 29 insertions(+), 32 deletions(-) diff --git a/app/gabsocial/features/auth_login/index.js b/app/gabsocial/features/auth_login/index.js index 6a846b2ce..705c42bc6 100644 --- a/app/gabsocial/features/auth_login/index.js +++ b/app/gabsocial/features/auth_login/index.js @@ -2,15 +2,11 @@ import React from 'react'; import { connect } from 'react-redux' import ImmutablePureComponent from 'react-immutable-pure-component'; import { createAuthApp, logIn } from 'gabsocial/actions/auth'; -import { Redirect } from 'react-router-dom'; import { fetchMe } from 'gabsocial/actions/me'; +import { Link } from 'react-router-dom'; -const mapStateToProps = (state, props) => ({ - me: state.get('me'), -}); - +export default @connect() class LoginForm extends ImmutablePureComponent { - constructor(props) { super(props); this.state = {isLoading: false}; @@ -40,19 +36,23 @@ class LoginForm extends ImmutablePureComponent { } render() { - const { me } = this.props; - if (me) return ; - return ( -
-
- - - + +
+
+ +
+
+ +
+

+ Trouble logging in? +

+
+ +
) } } - -export default connect(mapStateToProps)(LoginForm); diff --git a/app/gabsocial/features/landing_page/index.js b/app/gabsocial/features/landing_page/index.js index 3756b36ae..acbaf00b5 100644 --- a/app/gabsocial/features/landing_page/index.js +++ b/app/gabsocial/features/landing_page/index.js @@ -2,6 +2,7 @@ import React from 'react'; import { connect } from 'react-redux' import ImmutablePureComponent from 'react-immutable-pure-component'; import { Link } from 'react-router-dom'; +import LoginForm from 'gabsocial/features/auth_login'; const mapStateToProps = (state, props) => ({ instance: state.get('instance'), @@ -37,22 +38,7 @@ class LandingPage extends ImmutablePureComponent {
-
-
-
- -
-
- -
-

- Trouble logging in? -

-
-
- -
-
+
Log in diff --git a/app/styles/gabsocial/forms.scss b/app/styles/gabsocial/forms.scss index 323da61b2..597e3e391 100644 --- a/app/styles/gabsocial/forms.scss +++ b/app/styles/gabsocial/forms.scss @@ -294,6 +294,17 @@ code { } } + fieldset[disabled] { + input[type=text], + input[type=number], + input[type=email], + input[type=password], + textarea { + color: rgba($primary-text-color, 0.5); + border-color: rgba($primary-text-color, 0.5); + } + } + input[type=text], input[type=number], input[type=email],