Fix the additional line endings (#4476)
This commit is contained in:
parent
5652b56b45
commit
911a303326
3 changed files with 103 additions and 103 deletions
|
@ -33,8 +33,8 @@
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"test": "react-scripts test",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject",
|
"eject": "react-scripts eject",
|
||||||
"lint": "eslint ./**/*.{ts,tsx}",
|
"lint": "eslint './**/*.{ts,tsx}'",
|
||||||
"lint:fix": "eslint ./**/*.{ts,tsx} --fix"
|
"lint:fix": "eslint './**/*.{ts,tsx}' --fix"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": "react-app"
|
"extends": "react-app"
|
||||||
|
|
|
@ -1,36 +1,36 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Dialog from '@material-ui/core/Dialog';
|
import Dialog from '@material-ui/core/Dialog';
|
||||||
import DialogContent from '@material-ui/core/DialogContent';
|
import DialogContent from '@material-ui/core/DialogContent';
|
||||||
import DialogTitle from '@material-ui/core/DialogTitle';
|
import DialogTitle from '@material-ui/core/DialogTitle';
|
||||||
import IconButton from '@material-ui/core/IconButton';
|
import IconButton from '@material-ui/core/IconButton';
|
||||||
import CloseIcon from '@material-ui/icons/Close';
|
import CloseIcon from '@material-ui/icons/Close';
|
||||||
import Typography from '@material-ui/core/Typography';
|
import Typography from '@material-ui/core/Typography';
|
||||||
|
|
||||||
import { RegisterForm } from 'forms';
|
import { RegisterForm } from 'forms';
|
||||||
|
|
||||||
import './RegistrationDialog.css';
|
import './RegistrationDialog.css';
|
||||||
|
|
||||||
const RegistrationDialog = ({ classes, handleClose, isOpen }: any) => {
|
const RegistrationDialog = ({ classes, handleClose, isOpen }: any) => {
|
||||||
const handleOnClose = () => {
|
const handleOnClose = () => {
|
||||||
handleClose();
|
handleClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog onClose={handleOnClose} open={isOpen}>
|
<Dialog onClose={handleOnClose} open={isOpen}>
|
||||||
<DialogTitle disableTypography className="dialog-title">
|
<DialogTitle disableTypography className="dialog-title">
|
||||||
<Typography variant="h6">Create New Account</Typography>
|
<Typography variant="h6">Create New Account</Typography>
|
||||||
|
|
||||||
{handleOnClose ? (
|
{handleOnClose ? (
|
||||||
<IconButton onClick={handleOnClose}>
|
<IconButton onClick={handleOnClose}>
|
||||||
<CloseIcon />
|
<CloseIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
) : null}
|
) : null}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<RegisterForm onSubmit={handleOnClose}></RegisterForm>
|
<RegisterForm onSubmit={handleOnClose}></RegisterForm>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default RegistrationDialog;
|
export default RegistrationDialog;
|
||||||
|
|
|
@ -1,66 +1,66 @@
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { Form, Field, reduxForm, change } from 'redux-form'
|
import { Form, Field, reduxForm, change } from 'redux-form'
|
||||||
|
|
||||||
import Button from '@material-ui/core/Button';
|
import Button from '@material-ui/core/Button';
|
||||||
|
|
||||||
import { InputField, KnownHosts } from 'components';
|
import { InputField, KnownHosts } from 'components';
|
||||||
import { FormKey } from 'types';
|
import { FormKey } from 'types';
|
||||||
|
|
||||||
import './RegisterForm.css';
|
import './RegisterForm.css';
|
||||||
|
|
||||||
const RegisterForm = (props) => {
|
const RegisterForm = (props) => {
|
||||||
const { dispatch, handleSubmit } = props;
|
const { dispatch, handleSubmit } = props;
|
||||||
|
|
||||||
const onHostChange = ({ host, port }) => {
|
const onHostChange = ({ host, port }) => {
|
||||||
dispatch(change(FormKey.REGISTER, 'host', host));
|
dispatch(change(FormKey.REGISTER, 'host', host));
|
||||||
dispatch(change(FormKey.REGISTER, 'port', port));
|
dispatch(change(FormKey.REGISTER, 'port', port));
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Form className="registerForm row" onSubmit={handleSubmit} autoComplete="off">
|
<Form className="registerForm row" onSubmit={handleSubmit} autoComplete="off">
|
||||||
<div className="leftRegisterForm column" >
|
<div className="leftRegisterForm column" >
|
||||||
<div className="registerForm-item">
|
<div className="registerForm-item">
|
||||||
<KnownHosts onChange={onHostChange} />
|
<KnownHosts onChange={onHostChange} />
|
||||||
{ /* Padding is off */ }
|
{ /* Padding is off */ }
|
||||||
</div>
|
</div>
|
||||||
<div className="registerForm-item">
|
<div className="registerForm-item">
|
||||||
<Field label="Country" name="country" component={InputField} />
|
<Field label="Country" name="country" component={InputField} />
|
||||||
</div>
|
</div>
|
||||||
<div className="registerForm-item">
|
<div className="registerForm-item">
|
||||||
<Field label="Real Name" name="realName" component={InputField} />
|
<Field label="Real Name" name="realName" component={InputField} />
|
||||||
</div>
|
</div>
|
||||||
<div className="registerForm-item">
|
<div className="registerForm-item">
|
||||||
<Field label="Email" name="email" type="email" component={InputField} />
|
<Field label="Email" name="email" type="email" component={InputField} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="rightRegisterForm column">
|
<div className="rightRegisterForm column">
|
||||||
<div className="registerForm-item">
|
<div className="registerForm-item">
|
||||||
<Field label="Player Name" name="user" component={InputField} />
|
<Field label="Player Name" name="user" component={InputField} />
|
||||||
</div>
|
</div>
|
||||||
<div className="registerForm-item">
|
<div className="registerForm-item">
|
||||||
<Field label="Password" name="pass" type="password" component={InputField} />
|
<Field label="Password" name="pass" type="password" component={InputField} />
|
||||||
</div>
|
</div>
|
||||||
<div className="registerForm-item">
|
<div className="registerForm-item">
|
||||||
<Field label="Password (again)" name="passwordConfirm" type="password" component={InputField} />
|
<Field label="Password (again)" name="passwordConfirm" type="password" component={InputField} />
|
||||||
</div>
|
</div>
|
||||||
<Button className="registerForm-submit tall" color="primary" variant="contained" type="submit">
|
<Button className="registerForm-submit tall" color="primary" variant="contained" type="submit">
|
||||||
Register
|
Register
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</Form >
|
</Form >
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const propsMap = {
|
const propsMap = {
|
||||||
form: FormKey.REGISTER,
|
form: FormKey.REGISTER,
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = () => ({
|
const mapStateToProps = () => ({
|
||||||
initialValues: {
|
initialValues: {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps)(reduxForm(propsMap)(RegisterForm));
|
export default connect(mapStateToProps)(reduxForm(propsMap)(RegisterForm));
|
||||||
|
|
Loading…
Reference in a new issue