diff --git a/package.json b/package.json index 9306d9b..42a7694 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "redux-localstorage-filter": "^0.1.1", "redux-simple-router": "^1.0.2", "redux-thunk": "^1.0.3", - "stardust": "^0.11.0" + "stardust": "^0.12.0" }, "devDependencies": { "autobind-decorator": "^1.3.2", diff --git a/src/components/Header/Header.js b/src/components/Header/Header.js index 6590ff7..f94bcdd 100644 --- a/src/components/Header/Header.js +++ b/src/components/Header/Header.js @@ -1,16 +1,19 @@ import React, { Component } from 'react' -import { Menu, MenuItem } from 'stardust' +import { Container, Menu } from 'stardust' import { Link } from 'react-router' + export default class Header extends Component { render() { return ( - - Profile - - - Dashboard - + + + Profile + + + Dashboard + + ) } diff --git a/src/components/LoginForm/LoginForm.js b/src/components/LoginForm/LoginForm.js index 9babd92..7a4213d 100644 --- a/src/components/LoginForm/LoginForm.js +++ b/src/components/LoginForm/LoginForm.js @@ -6,7 +6,6 @@ import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import { Button, - Field, Form, Input, Message, @@ -15,11 +14,6 @@ import { import { login } from 'services/session' -const FORM_SETTINGS = { - // stop Semantic UI from submitting form - onSuccess: () => false, -} - export default class LoginForm extends Component { static propTypes = { actions: PropTypes.object.isRequired, @@ -75,9 +69,9 @@ export default class LoginForm extends Component { return ( -
+ {this.renderErrorMessage()} - + - - + + - + diff --git a/src/layouts/AppLayout/AppLayout.js b/src/layouts/AppLayout/AppLayout.js index 8efbb25..11db2bb 100644 --- a/src/layouts/AppLayout/AppLayout.js +++ b/src/layouts/AppLayout/AppLayout.js @@ -1,6 +1,7 @@ import React from 'react' import Header from 'components/Header/Header' -import classes from './AppLayout.scss' +import './AppLayout.scss' +import { Container, Grid } from 'stardust' class AppLayout extends React.Component { static propTypes = { @@ -9,12 +10,20 @@ class AppLayout extends React.Component { render() { return ( -
-
-
- {this.props.children} -
-
+ + +
+ + + + + + {this.props.children} + + + + + ) } } diff --git a/src/layouts/AppLayout/AppLayout.scss b/src/layouts/AppLayout/AppLayout.scss index c386aa7..9b1c788 100644 --- a/src/layouts/AppLayout/AppLayout.scss +++ b/src/layouts/AppLayout/AppLayout.scss @@ -1,10 +1,3 @@ :global { @import 'core'; } - -.mainLayout { - display: flex; - flex: 1 0 0; - flex-flow: column wrap; - padding-top: 3.75em; -} diff --git a/src/resources/tsc/index.js b/src/resources/tsc/index.js index eb04b1c..ae455b1 100644 --- a/src/resources/tsc/index.js +++ b/src/resources/tsc/index.js @@ -22,16 +22,19 @@ const DEFAULT_HEADERS = { 'Content-Type': 'application/json', } +const API_URL = 'https://threesc-api.herokuapp.com/' + const ENDPOINTS = { applicants: 'api/applicants/', assignments: 'api/assignments/', + connectGithub: 'login/github/', recipes: 'api/recipes/', - passwordReset: '/rest-auth/password/reset/', - passwordConfirm: '/rest-auth/password/reset/confirm/', - passwordChange: '/rest-auth/password/change/', - login: '/rest-auth/login/', - logout: '/rest-auth/logout/', - user: '/rest-auth/user/', + passwordReset: 'rest-auth/password/reset/', + passwordConfirm: 'rest-auth/password/reset/confirm/', + passwordChange: 'rest-auth/password/change/', + login: 'rest-auth/login/', + logout: 'rest-auth/logout/', + user: 'rest-auth/user/', } // ---------------------------------------------------- @@ -39,7 +42,7 @@ const ENDPOINTS = { // ---------------------------------------------------- const ajax = axios.create({ - baseURL: 'https://threesc-api.herokuapp.com', + baseURL: API_URL, }) ajax.interceptors.request.use(config => { @@ -94,6 +97,8 @@ tsc.logout = () => { return Promise.resolve() } +tsc.connectGithub = () => window.location = API_URL + ENDPOINTS.connectGithub + // ---------------------------------------------------- // Namespaces (resources/models) // ---------------------------------------------------- diff --git a/src/views/LoginView/LoginView.js b/src/views/LoginView/LoginView.js index 94203be..3dc46c9 100644 --- a/src/views/LoginView/LoginView.js +++ b/src/views/LoginView/LoginView.js @@ -4,7 +4,6 @@ import { Grid, Header, Image, - Column, } from 'stardust' import './LoginView.scss' @@ -30,12 +29,12 @@ class LoginView extends Component { const logo = return ( - + 3 Strand Code - + ) } diff --git a/src/views/ProfileView/ProfileView.js b/src/views/ProfileView/ProfileView.js index e48e006..4f9f002 100644 --- a/src/views/ProfileView/ProfileView.js +++ b/src/views/ProfileView/ProfileView.js @@ -1,17 +1,51 @@ -import React, { Component, PropTypes } from 'react' -import { - Grid, - Header, - Column, -} from 'stardust' +import React, { Component } from 'react' +import { Button, Form, Grid, Header, Input, Segment } from 'stardust' +import tsc from 'resources/tsc' class ProfileView extends Component { + handleClickGithub() { + tsc.connectGithub() + } + render() { return ( - - Profile - + + + Profile + + + + + + + + Connect Services + + + + + + + + + + + + + + + + + + + + + + ) }