forked from p15670423/monkey
Changed login page to match the style of registration page
This commit is contained in:
parent
a1da0e3239
commit
1cc5310713
|
@ -1,7 +1,10 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Col} from 'react-bootstrap';
|
import {Button, Col, Container, Form, Row} from 'react-bootstrap';
|
||||||
|
|
||||||
import AuthService from '../../services/AuthService';
|
import AuthService from '../../services/AuthService';
|
||||||
|
import Particles from "react-particles-js";
|
||||||
|
import {particleParams} from "../../styles/particle-component/RegistrationPageParams";
|
||||||
|
import monkeyDetective from "../../images/militant-monkey.svg";
|
||||||
|
|
||||||
class LoginPageComponent extends React.Component {
|
class LoginPageComponent extends React.Component {
|
||||||
login = () => {
|
login = () => {
|
||||||
|
@ -55,39 +58,38 @@ class LoginPageComponent extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Col sm={{offset: 3, span: 9}} md={{offset: 3, span: 9}}
|
<Container fluid className={'auth-container'}>
|
||||||
lg={{offset: 3, span: 9}} xl={{offset: 2, span: 7}}
|
<Particles className={'particle-background'} params={particleParams}/>
|
||||||
className={'main'}>
|
<Row>
|
||||||
<h1 className="page-title">Login</h1>
|
<Col xs={12} lg={{span: 6, offset: 3}} md={{span: 7, offset: 3}} className={'auth-block'}>
|
||||||
<div style={{'fontSize': '1.2em'}}>
|
<Row>
|
||||||
<div className="panel panel-default">
|
<Col lg={8} md={8} sm={8}>
|
||||||
<div className="panel-heading text-center">
|
<h1 className='auth-title'>Login</h1>
|
||||||
<b>Login</b>
|
<div>
|
||||||
</div>
|
<Form className={'auth-form'}>
|
||||||
<div className="panel-body">
|
<Form.Control onChange={evt => this.updateUsername(evt)} type='text' placeholder='Username'/>
|
||||||
<div className="input-group center-block text-center">
|
<Form.Control onChange={evt => this.updatePassword(evt)} type='password' placeholder='Password'/>
|
||||||
<input type="text" className="form-control" placeholder="Username"
|
<Button id={'auth-button'} onClick={() => {
|
||||||
onChange={evt => this.updateUsername(evt)}/>
|
|
||||||
<input type="password" className="form-control" placeholder="Password"
|
|
||||||
onChange={evt => this.updatePassword(evt)}/>
|
|
||||||
<button type="button" className="btn btn-primary btn-lg" style={{margin: '5px'}}
|
|
||||||
onClick={() => {
|
|
||||||
this.login()
|
this.login()
|
||||||
}}>
|
}}>
|
||||||
Login
|
Login
|
||||||
</button>
|
</Button>
|
||||||
{
|
{
|
||||||
this.state.failed ?
|
this.state.failed ?
|
||||||
<div className="alert alert-danger" role="alert">Login failed. Bad credentials.</div>
|
<div className="alert alert-danger" role="alert">Login failed. Bad credentials.</div>
|
||||||
:
|
:
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
</div>
|
</Form>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
);
|
<Col lg={4} md={4} sm={4}>
|
||||||
|
<img alt="infection monkey" className={'monkey-detective'} src={monkeyDetective}/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</Container>)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ import {Row, Col, Container, Form, Button} from 'react-bootstrap';
|
||||||
import Particles from 'react-particles-js';
|
import Particles from 'react-particles-js';
|
||||||
|
|
||||||
import AuthService from '../../services/AuthService';
|
import AuthService from '../../services/AuthService';
|
||||||
import '../../styles/RegisterPage.scss';
|
|
||||||
import {particleParams} from '../../styles/particle-component/RegistrationPageParams';
|
import {particleParams} from '../../styles/particle-component/RegistrationPageParams';
|
||||||
import monkeyDetective from '../../images/detective-monkey.svg';
|
import monkeyDetective from '../../images/detective-monkey.svg';
|
||||||
|
|
||||||
|
@ -80,19 +79,20 @@ class RegisterPageComponent extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Container fluid className={'registration-container'}>
|
<Container fluid className={'auth-container'}>
|
||||||
<Particles className={'particle-background'} params={particleParams}/>
|
<Particles className={'particle-background'} params={particleParams}/>
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={12} lg={{span: 6, offset: 3}} md={{span: 7, offset: 3}} className={'registration-block'}>
|
<Col xs={12} lg={{span: 6, offset: 3}} md={{span: 7, offset: 3}}
|
||||||
|
className={'auth-block'}>
|
||||||
<Row>
|
<Row>
|
||||||
<Col lg={8} md={8} sm={8}>
|
<Col lg={8} md={8} sm={8}>
|
||||||
<h1 className='reg-title'>First time?</h1>
|
<h1 className='reg-title'>First time?</h1>
|
||||||
<h3 className='reg-subtitle'>Let's secure your island!</h3>
|
<h3 className='reg-subtitle'>Let's secure your island!</h3>
|
||||||
<div>
|
<div>
|
||||||
<Form className={'registration-form'}>
|
<Form className={'auth-form'}>
|
||||||
<Form.Control onChange={evt => this.updateUsername(evt)} type='text' placeholder='Username'/>
|
<Form.Control onChange={evt => this.updateUsername(evt)} type='text' placeholder='Username'/>
|
||||||
<Form.Control onChange={evt => this.updatePassword(evt)} type='password' placeholder='Password'/>
|
<Form.Control onChange={evt => this.updatePassword(evt)} type='password' placeholder='Password'/>
|
||||||
<Button id={'registration-button'} onClick={() => {
|
<Button id={'auth-button'} onClick={() => {
|
||||||
this.register()
|
this.register()
|
||||||
}}>
|
}}>
|
||||||
Lets Go!
|
Lets Go!
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
.registration-container {
|
.auth-container {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.registration-form input {
|
.auth-form input {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.registration-form input:focus {
|
.auth-form input:focus {
|
||||||
border-color: #ffcc00;
|
border-color: $monkey-yellow;
|
||||||
box-shadow: 0 0 0 0.2rem rgba(255, 230, 0, 0.25);
|
box-shadow: 0 0 0 0.2rem rgba(255, 230, 0, 0.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
.registration-form .alert {
|
.auth-form .alert {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#registration-button {
|
#auth-button {
|
||||||
border-color: #3f3f3f;
|
border-color: #3f3f3f;
|
||||||
font-size: 1.3em;
|
font-size: 1.3em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #3f3f3f;
|
background-color: #3f3f3f;
|
||||||
color: #ffde00;
|
color: $monkey-yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
#registration-button:hover {
|
#auth-button:hover {
|
||||||
border-color: #ffde00;
|
border-color: $monkey-yellow;
|
||||||
font-size: 1.3em;
|
font-size: 1.3em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #ffde00;
|
background-color: $monkey-yellow;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,27 +46,29 @@
|
||||||
background-color: #1a1a1a;
|
background-color: #1a1a1a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.registration-block {
|
.auth-block {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: rgba(255, 255, 255, 0.89);
|
background-color: rgba(255, 255, 255, 0.89);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.registration-block h1 {
|
.auth-block h1 {
|
||||||
font-size: 4.5em;
|
font-size: 4.5em;
|
||||||
margin-bottom: 0;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.registration-block h3 {
|
.auth-block h3 {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-auth-link {
|
.no-auth-link {
|
||||||
|
margin-top: 10px;
|
||||||
float: right;
|
float: right;
|
||||||
color: #6a5b00;
|
color: $monkey-black;
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-auth-link:hover {
|
.no-auth-link:hover {
|
||||||
float: right;
|
float: right;
|
||||||
color: #796900;
|
color: $monkey-yellow;
|
||||||
}
|
}
|
|
@ -7,6 +7,7 @@
|
||||||
@import './report/AttackReport.scss';
|
@import './report/AttackReport.scss';
|
||||||
@import './PreviewPane.scss';
|
@import './PreviewPane.scss';
|
||||||
@import './ConfigurationPage';
|
@import './ConfigurationPage';
|
||||||
|
@import './AuthPage';
|
||||||
|
|
||||||
|
|
||||||
// Define custom elements after bootstrap import
|
// Define custom elements after bootstrap import
|
||||||
|
|
Loading…
Reference in New Issue