This commit is contained in:
snoop 2017-07-26 19:30:13 +09:00
commit fa016d93f9
4 changed files with 125 additions and 131 deletions

View File

@ -1,5 +1,11 @@
import * as React from 'react'; import * as React from 'react';
import { RouteComponentProps, RouteProps, Route, Switch } from 'react-router-dom'; import { RouteComponentProps, RouteProps, Route, Switch, } from 'react-router-dom';
import {
Header,
Grid,
Image,
Segment,
} from 'semantic-ui-react';
import SignIn from '../member/SignIn'; import SignIn from '../member/SignIn';
import SignUp from '../member/SignUp'; import SignUp from '../member/SignUp';
@ -20,12 +26,22 @@ class AccountLayout extends React.Component<Props, State> {
public render(): JSX.Element { public render(): JSX.Element {
return ( return (
<Grid textAlign='center' className='fullHeight' verticalAlign='middle' style={{background:'#1a1b37'}}>
<Grid.Column style={{ maxWidth: 450 }}>
<Header as='h2' color='teal' textAlign='center'>
<Image src='../asset/image/overFlow_CI_blue_180.png' /><br />
{' '}Log-in to your account
</Header>
<Segment raised style={{paddingBottom:'0px'}}>
<Switch> <Switch>
<Route path={`${this.props.match.url}/signin`} component={SignIn}/> <Route path={`${this.props.match.url}/signin`} component={SignIn}/>
<Route path={`${this.props.match.url}/signup`} component={SignUp}/> <Route path={`${this.props.match.url}/signup`} component={SignUp}/>
<Route path={`${this.props.match.url}/check_email`} component={EmailConfirm}/> <Route path={`${this.props.match.url}/check_email`} component={EmailConfirm}/>
<Route path={`${this.props.match.url}/forgot_password`} component={ForgotPassword}/> <Route path={`${this.props.match.url}/forgot_password`} component={ForgotPassword}/>
</Switch> </Switch>
</Segment>
</Grid.Column>
</Grid>
); );
} }

View File

@ -2,11 +2,9 @@ import *as React from 'react';
import { import {
Input, Input,
InputOnChangeData, InputOnChangeData,
Select,
Button, Button,
Grid,
Form, Form,
Container, ButtonProps, ButtonProps,
} from 'semantic-ui-react'; } from 'semantic-ui-react';
export interface StateProps { export interface StateProps {
@ -36,9 +34,6 @@ export class PWChange extends React.Component<Props, State> {
public render(): JSX.Element { public render(): JSX.Element {
return ( return (
<Container fluid>
<Grid centered verticalAlign='middle'>
<Grid.Column mobile={16} tablet={6} computer={5}>
<Form> <Form>
<Form.Input placeholder='Password' type='password' onChange={ <Form.Input placeholder='Password' type='password' onChange={
(event: React.SyntheticEvent<HTMLInputElement>, data: InputOnChangeData) => { (event: React.SyntheticEvent<HTMLInputElement>, data: InputOnChangeData) => {
@ -53,9 +48,6 @@ export class PWChange extends React.Component<Props, State> {
<Button fluid style={{margin:'7'}}> Cancel </Button> <Button fluid style={{margin:'7'}}> Cancel </Button>
</Form.Group> </Form.Group>
</Form> </Form>
</Grid.Column>
</Grid>
</Container>
); );
} }

View File

@ -4,12 +4,11 @@ import {
InputOnChangeData, InputOnChangeData,
Select, Select,
Button, Button,
Header,
Modal, Modal,
Grid,
Form, Form,
Container,
ButtonProps, ButtonProps,
Grid,
Header,
} from 'semantic-ui-react'; } from 'semantic-ui-react';
const options = [ const options = [
@ -50,8 +49,6 @@ export class SignIn extends React.Component<Props, State> {
public render(): JSX.Element { public render(): JSX.Element {
return ( return (
<Grid textAlign='center' className='fullHeight' verticalAlign='middle'>
<Grid.Column mobile={16} tablet={6} computer={5}>
<Form> <Form>
<Form.Input fluid placeholder='Email' onChange={ <Form.Input fluid placeholder='Email' onChange={
(event: React.SyntheticEvent<HTMLInputElement>, data: InputOnChangeData) => { (event: React.SyntheticEvent<HTMLInputElement>, data: InputOnChangeData) => {
@ -62,20 +59,19 @@ export class SignIn extends React.Component<Props, State> {
this.setState({ pass: data.value }); this.setState({ pass: data.value });
}} /> }} />
<div style={{textAlign:'right'}}> <div style={{textAlign:'right'}}>
<a style={{fontSize:10}} onClick={this.forgotPopupOpen}>Forgot Password</a> <Button size='tiny' style={{background:'#fff'}} onClick={this.forgotPopupOpen}>Forgot Password?</Button>
</div> </div>
<Form.Group> <Form.Group>
<Button fluid primary style={{margin:'7'}} onClick={ this.signInClick.bind(this) }> Sign In </Button> <Button fluid primary style={{margin:'7'}} onClick={ this.signInClick.bind(this) }> Sign In </Button>
<Button fluid style={{margin:'7'}} href='/#/test2'> Sign Up </Button> <Button fluid style={{margin:'7'}} href='/#/test2'> Sign Up </Button>
</Form.Group> </Form.Group>
</Form>
<Modal size='small' open={this.state.forgotPopup} onClose={this.PopupClose}> <Modal size='small' open={this.state.forgotPopup} onClose={this.PopupClose}>
<Modal.Header>Change your password</Modal.Header> <Modal.Header>Change your password</Modal.Header>
<Modal.Content > <Modal.Content >
Enter email address Enter email address
<Grid centered> <Grid centered>
<Grid.Column mobile={14} tablet={8} computer={6}> <Grid.Column mobile={14} tablet={10} computer={10}>
<Input fluid placeholder='Email' /> <Input fluid placeholder='Email' />
</Grid.Column> </Grid.Column>
</Grid> </Grid>
@ -98,9 +94,7 @@ export class SignIn extends React.Component<Props, State> {
<Button primary onClick={this.PopupClose}> Ok </Button> <Button primary onClick={this.PopupClose}> Ok </Button>
</Modal.Actions> </Modal.Actions>
</Modal> </Modal>
</Form>
</Grid.Column>
</Grid>
); );
} }

View File

@ -4,9 +4,8 @@ import Member from '../../api/model/Member';
import { import {
InputOnChangeData, InputOnChangeData,
Button, Button,
Grid,
Form, Form,
Container, ButtonProps, ButtonProps,
} from 'semantic-ui-react'; } from 'semantic-ui-react';
export interface StateProps { export interface StateProps {
@ -57,9 +56,6 @@ export class SignUp extends React.Component<Props, State> {
public render(): JSX.Element { public render(): JSX.Element {
return ( return (
<Container fluid>
<Grid centered verticalAlign='middle'>
<Grid.Column mobile={16} tablet={6} computer={5}>
<Form> <Form>
<Form.Input fluid value={this.state.email} placeholder='Email' onChange={ <Form.Input fluid value={this.state.email} placeholder='Email' onChange={
(event: React.SyntheticEvent<HTMLInputElement>, data: InputOnChangeData) => { (event: React.SyntheticEvent<HTMLInputElement>, data: InputOnChangeData) => {
@ -100,10 +96,6 @@ export class SignUp extends React.Component<Props, State> {
<Button fluid style={{margin:'7'}}> Cancel </Button> <Button fluid style={{margin:'7'}}> Cancel </Button>
</Form.Group> </Form.Group>
</Form> </Form>
</Grid.Column>
</Grid>
</Container>
); );
} }