From 2e7421f342c699e2cb4e1c0d83109008e24f9ddc Mon Sep 17 00:00:00 2001 From: mjrode Date: Fri, 5 Apr 2019 21:38:47 -0500 Subject: [PATCH] Add modal and plex token form --- client/package-lock.json | 82 ++++++++++++----- client/public/favicon.ico | Bin 3870 -> 15406 bytes client/public/index.html | 2 +- client/src/actions/index.js | 3 +- client/src/components/App.js | 32 +++---- client/src/components/CreateAccount.css | 7 ++ client/src/components/CreateAccount.js | 116 ++++++++++++++++++++++++ client/src/components/Dashboard.js | 8 -- client/src/components/Header.js | 16 +--- client/src/components/Hero.js | 102 +++++++++++++++++++++ client/src/components/Landing.js | 12 --- client/src/components/Modal.js | 111 +++++++++++++++++++++++ client/src/components/css.js | 60 ++++++++++++ client/src/components/plex/PlexForm.js | 82 +++++++++-------- client/src/components/plex/PlexNew.js | 6 +- client/src/index.js | 1 + server/index.js | 1 + server/services/auth/passport.js | 2 +- 18 files changed, 527 insertions(+), 116 deletions(-) mode change 100644 => 100755 client/public/favicon.ico create mode 100644 client/src/components/CreateAccount.css create mode 100644 client/src/components/CreateAccount.js delete mode 100644 client/src/components/Dashboard.js create mode 100644 client/src/components/Hero.js delete mode 100644 client/src/components/Landing.js create mode 100644 client/src/components/Modal.js create mode 100644 client/src/components/css.js diff --git a/client/package-lock.json b/client/package-lock.json index 2634d62..82ea81f 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -2657,7 +2657,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2675,11 +2676,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2692,15 +2695,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2803,7 +2809,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2813,6 +2820,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2825,17 +2833,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -2852,6 +2863,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2924,7 +2936,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2934,6 +2947,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3009,7 +3023,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -3039,6 +3054,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3056,6 +3072,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3094,11 +3111,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -5720,7 +5739,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -5738,11 +5758,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5755,15 +5777,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5866,7 +5891,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -5876,6 +5902,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5888,17 +5915,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -5915,6 +5945,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -5987,7 +6018,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -5997,6 +6029,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6072,7 +6105,8 @@ }, "safe-buffer": { "version": "5.1.1", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -6102,6 +6136,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6119,6 +6154,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6157,11 +6193,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.2", - "bundled": true + "bundled": true, + "optional": true } } }, diff --git a/client/public/favicon.ico b/client/public/favicon.ico old mode 100644 new mode 100755 index a11777cc471a4344702741ab1c8a588998b1311a..2a87841ac6cf40ad87fa0475bd77c25acc0156d4 GIT binary patch literal 15406 zcmeHNX|Nqd6}})<7Qcia{4$mMUJNlJNCFsf4Y&qH%jE|`p=cqBS}qu|5EXGrxqzsp zV)C}^I|)f38zCV(*$iaQlPsE-@IqeRow@ry?f0FzJ-27>lDGQmmUh*>J=1fx?mpe; z^f?_0T^4#%=&GwisGC9$UJ(jS3WY*VP44^nt3#m@~+0w6*ZTwb?NY_)Nu8g#WTOw^u4t}b}58uKqgf;2#y|=Y# zYYm(VT7)%el=xP_)u$J3p$yVr$ZRkEpo%^B1wW0Bu`0IqUau{>^0UgCeZ78n^jMKk za_7%gF@8>eliFVTVZ{=C_D&UBbB}V0IaRoLL`9c<+=VNRGx6gazondP%!f~2KvJ<) zpI6CUzf{>%tCcnX7M0lch`{MNBEG%wy?}L8{KW@V{`FldeXvzU+Q+Cu&mooE{u8(D z)xY`am*!WGQ@-b*im$y-S+lNFPR3G+tq-fz?%$~FiB&4G={u^J=$1AO@975Td*<80 z`Tmt-m0!QofVDyJNG+6!BGzPkUh_8#*Nv#{+99?4lYW)7z+-I8byA40?PlGLy8Drjp zdA-|e3%B;Rh4*1@FXC4y{VuYN-v~q4!Sd7iJuPn?2ion}TTPgLK!V-tLnofUf zwPe(lR(tqK%u}wfe1mYrB@NQ*5C03(M_n6f4Id8D8}K`5k!D|H=$R3|3HshMU|u!n zDBMHZ^<&gX)CQt%3}`@wJK zdwjzK9-ri{UwN?fM_7ufiz?H(NPHEMA*hq3{oJI<=N$YL!M9I&G=ngFk3Rb;f#aXa zztDS3+EaU<5d6eT--9p(MZe3W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ROX ztd54huAk&mFBemMooL33RV-*1f0Q3_(7hl$<#*|WF9P!;r;4_+X~k~uKEqdzZ$5Al zV63XN@)j$FN#cCD;ek1R#l zv%pGrhB~KWgoCj%GT?%{@@o(AJGt*PG#l3i>lhmb_twKH^EYvacVY-6bsCl5*^~L0 zonm@lk2UvvTKr2RS%}T>^~EYqdL1q4nD%0n&Xqr^cK^`J5W;lRRB^R-O8b&HENO||mo0xaD+S=I8RTlIfVgqN@SXDr2&-)we--K7w= zJVU8?Z+7k9dy;s;^gDkQa`0nz6N{T?(A&Iz)2!DEecLyRa&FI!id#5Z7B*O2=PsR0 zEvc|8{NS^)!d)MDX(97Xw}m&kEO@5jqRaDZ!+%`wYOI<23q|&js`&o4xvjP7D_xv@ z5hEwpsp{HezI9!~6O{~)lLR@oF7?J7i>1|5a~UuoN=q&6N}EJPV_GD`&M*v8Y`^2j zKII*d_@Fi$+i*YEW+Hbzn{iQk~yP z>7N{S4)r*!NwQ`(qcN#8SRQsNK6>{)X12nbF`*7#ecO7I)Q$uZsV+xS4E7aUn+U(K baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ diff --git a/client/public/index.html b/client/public/index.html index 476d00b..c7036ba 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -32,7 +32,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - React App + PlexRex diff --git a/client/src/actions/index.js b/client/src/actions/index.js index 8b35777..d06cda0 100644 --- a/client/src/actions/index.js +++ b/client/src/actions/index.js @@ -1,8 +1,9 @@ import axios from 'axios'; import {FETCH_USER, FETCH_PLEX_TOKEN} from './types'; +// Action Creators export const fetchUser = () => async dispatch => { - const res = await axios.get('/auth/current_user'); + const res = await axios.get('/api/auth/current_user'); dispatch({type: FETCH_USER, payload: res.data}); }; diff --git a/client/src/components/App.js b/client/src/components/App.js index 99b792a..2eea422 100644 --- a/client/src/components/App.js +++ b/client/src/components/App.js @@ -1,27 +1,19 @@ import React, {Component} from 'react'; import {BrowserRouter, Route} from 'react-router-dom'; +import {connect} from 'react-redux'; import axios from 'axios'; +import * as actions from '../actions'; import Header from './Header'; -import Landing from './Landing'; -import Dashboard from './Dashboard'; +import Hero from './Hero'; +import CreateAccount from './CreateAccount'; import PlexForm from './plex/PlexForm'; -// const Dashboard = () =>

Dashboard

; -// const SurveyNew = () =>

SurveyNew

; class App extends Component { - state = {user: {}}; componentDidMount() { - this.fetchUser(); + this.props.fetchUser(); } - fetchUser = async () => { - const res = await axios.get('/auth/current_user'); - this.setState({user: res.data}); - console.log(res.data); - return res; - }; - render() { return (
@@ -29,13 +21,10 @@ class App extends Component {
- - + - } - /> + +
@@ -44,4 +33,7 @@ class App extends Component { } } -export default App; +export default connect( + null, + actions, +)(App); diff --git a/client/src/components/CreateAccount.css b/client/src/components/CreateAccount.css new file mode 100644 index 0000000..ff94e8f --- /dev/null +++ b/client/src/components/CreateAccount.css @@ -0,0 +1,7 @@ +.no-bottom-margin { + margin-bottom: 0px; +} + +.margin-spacing { + margin: 3em 0; +} diff --git a/client/src/components/CreateAccount.js b/client/src/components/CreateAccount.js new file mode 100644 index 0000000..0f86c21 --- /dev/null +++ b/client/src/components/CreateAccount.js @@ -0,0 +1,116 @@ +import React from 'react'; +import axios from 'axios'; +import PropTypes from 'prop-types'; +import CssBaseline from '@material-ui/core/CssBaseline'; +import {connect} from 'react-redux'; +import {withStyles} from '@material-ui/core/styles'; +import './CreateAccount.css'; +import Modal from './Modal'; +import styles from './css'; + +class CreateAccount extends React.Component { + state = {email: '', password: '', section_data: ''}; + + onFormSubmit = event => { + event.preventDefault(); + this.getPlexToken(this.state); + }; + + getPlexToken = async params => { + const res = await axios.get('/plex/auth', {params}); + return res; + }; + + fetchSections = async params => { + const res = await axios.get('/plex/library/sections'); + console.log(res); + this.setState({section_data: res.data}); + }; + + render() { + const {classes} = this.props; + return ( + + +
+
+
+

Fetch Plex Token

+
+ +
+
+
+
+
+
+
+

Plex Email

+ this.setState({email: e.target.value})} + /> +
+
+
+
+

Plex Server URL

+ this.setState({email: e.target.value})} + /> +
+
+
+
+

Plex Password

+ + this.setState({password: e.target.value}) + } + /> +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ ); + } +} + +CreateAccount.propTypes = { + classes: PropTypes.object.isRequired, +}; + +function mapStateToProps({auth}) { + return {auth}; +} + +export default connect(mapStateToProps)(withStyles(styles)(CreateAccount)); diff --git a/client/src/components/Dashboard.js b/client/src/components/Dashboard.js deleted file mode 100644 index 2bf08a5..0000000 --- a/client/src/components/Dashboard.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from 'react'; -// import {Link} from 'react-router-dom'; - -const Dashboard = () => { - return
Dashboard
; -}; - -export default Dashboard; diff --git a/client/src/components/Header.js b/client/src/components/Header.js index fdfb1a5..055340a 100644 --- a/client/src/components/Header.js +++ b/client/src/components/Header.js @@ -4,28 +4,20 @@ import {Link} from 'react-router-dom'; class Header extends Component { renderContent() { + console.log('this.props.auth', this.props.auth); switch (this.props.auth) { case null: return; case false: return (
  • - Login With Google + Login With Google
  • ); default: - if (!this.props.auth.plexToken) { - return ( -
  • - - live_tvImport Plex - -
  • - ); - } return (
  • - Logout + Logout
  • ); } @@ -35,7 +27,7 @@ class Header extends Component {