Removed Semantic UI React
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import React from 'react'
|
||||
import { api } from '../helpers'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Container } from 'semantic-ui-react'
|
||||
import { MessageDialog, WaitDialog } from '../Dialog'
|
||||
import './ConfirmEmail.scss'
|
||||
|
||||
export class ConfirmEmail extends React.Component {
|
||||
static propTypes = {
|
||||
@@ -56,7 +54,7 @@ export class ConfirmEmail extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Container className='email-confirm-container'>
|
||||
<div>
|
||||
<WaitDialog active={!!this.state.waitDialog}
|
||||
message={this.state.waitDialog ? this.state.waitDialog.message : ''} />
|
||||
|
||||
@@ -64,7 +62,7 @@ export class ConfirmEmail extends React.Component {
|
||||
title={this.state.messageDialog ? this.state.messageDialog.title : ''}
|
||||
message={this.state.messageDialog ? this.state.messageDialog.message : ''}
|
||||
onDismiss={this.handleMessageDialogDismiss} />
|
||||
</Container>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
.ui.container.email-confirm-container {
|
||||
display: flex;
|
||||
height: 80vh;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.ui.container.email-confirm-container button {
|
||||
margin-top: 1em;
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { regExpPattern } from 'regexp-pattern'
|
||||
import { Container, Header, Form, Message } from 'semantic-ui-react'
|
||||
import './ForgotPassword.scss'
|
||||
import { Text, StackLayout } from '../ui'
|
||||
import { MessageDialog, WaitDialog } from '../Dialog'
|
||||
import { Validator, ValidatedInput, ValidatedButton } from '../Validated'
|
||||
import { api } from '../helpers'
|
||||
@@ -67,16 +66,26 @@ export class ForgotPassword extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Container className='forgot-password-container'>
|
||||
<Header content='Forgotten Password' size='large' />
|
||||
<Form size='large' onSubmit={this.handleSubmit}>
|
||||
<ValidatedInput label='Email' name='email'
|
||||
placeholder='example@xyz.com' validator={this.state.validator}
|
||||
message='A valid email address' />
|
||||
<Message info content='The email address of an existing user to send the password reset link to.' />
|
||||
<ValidatedButton className='submit' name='submit' content='Submit'
|
||||
primary submit validator={this.state.validator}>Submit</ValidatedButton>
|
||||
</Form>
|
||||
<div>
|
||||
<form onSubmit={this.handleSubmit}>
|
||||
<StackLayout>
|
||||
<StackLayout.Item>
|
||||
<Text size='large'>Forgotten Password</Text>
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<ValidatedInput label='Email' name='email'
|
||||
placeholder='example@xyz.com' validator={this.state.validator}
|
||||
message='A valid email address' />
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<Text>The email address of an existing user to send the password reset link to.</Text>
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<ValidatedButton className='submit' name='submit' content='Submit'
|
||||
primary submit validator={this.state.validator}>Submit</ValidatedButton>
|
||||
</StackLayout.Item>
|
||||
</StackLayout>
|
||||
</form>
|
||||
|
||||
<WaitDialog active={!!this.state.waitDialog}
|
||||
message={this.state.waitDialog ? this.state.waitDialog.message : ''} />
|
||||
@@ -87,7 +96,7 @@ export class ForgotPassword extends React.Component {
|
||||
title={this.state.messageDialog ? this.state.messageDialog.title : ''}
|
||||
message={this.state.messageDialog ? this.state.messageDialog.message : ''}
|
||||
onDismiss={this.handleMessageDialogDismiss} />
|
||||
</Container>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
.ui.container.forgot-password-container {
|
||||
height: 80vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.ui.container.forgot-password-container .header {
|
||||
border-bottom: 1px solid #d4d4d5;
|
||||
width: 40%;
|
||||
padding-bottom: 0.5em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.ui.container.forgot-password-container form {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.ui.container.forgot-password-container .message {
|
||||
margin: 2em 0;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Container, Header, Form, Message } from 'semantic-ui-react'
|
||||
import './Login.scss'
|
||||
import { regExpPattern } from 'regexp-pattern'
|
||||
import { api } from '../helpers'
|
||||
import { Validator, ValidatedInput, ValidatedCheckbox } from '../Validated'
|
||||
import { Validator, ValidatedInput, ValidatedCheckbox, ValidatedButton } from '../Validated'
|
||||
import { WaitDialog, MessageDialog } from '../Dialog'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { Button } from '../ui'
|
||||
import { Image, Link, Text, StackLayout } from '../ui'
|
||||
import headerLogo from 'images/deighton.png'
|
||||
|
||||
export class Login extends React.Component {
|
||||
static propTypes = {
|
||||
@@ -90,30 +88,40 @@ export class Login extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Container id='login' className='password-reset-container'>
|
||||
<Header size='large'>Login Portal</Header>
|
||||
<Form onSubmit={this.handleSubmit}>
|
||||
{/* Add in 'Username' field pass */}
|
||||
<ValidatedInput label='Email' name='email'
|
||||
placeholder='example@xyz.com' validator={this.state.validator}
|
||||
message='Enter the email address associated with your account.' width={16} />
|
||||
<ValidatedInput password label='Password' name='password'
|
||||
validator={this.state.validator} message='Enter your password.' width={16} />
|
||||
<Form.Group widths='equal' className='login-options'>
|
||||
<Form.Field className='login-password'>
|
||||
<div>
|
||||
<form onSubmit={this.handleSubmit}>
|
||||
<StackLayout>
|
||||
<StackLayout.Item>
|
||||
<Image source={headerLogo} width={279} height={73} />
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<ValidatedInput label='Email' name='email'
|
||||
placeholder='example@xyz.com' validator={this.state.validator}
|
||||
message='Enter the email address associated with your account.' width={16} />
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<ValidatedInput password label='Password' name='password'
|
||||
validator={this.state.validator} message='Enter your password.' width={16} />
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<Link to='/forgot-password'>Forgot your password?</Link>
|
||||
</Form.Field>
|
||||
<ValidatedCheckbox label='Remember Me'
|
||||
name='rememberMe' onChange={this.handleChange} validator={this.state.validator}
|
||||
message='Should we keep you logged in on this computer?' className='login-checkbox' />
|
||||
</Form.Group>
|
||||
{ /* <ValidatedButton className='submit' name='submit' content='Submit'
|
||||
primary submit validator={this.state.validator} /> */ }
|
||||
<Button>Login</Button>
|
||||
<Message info>
|
||||
Please contact <a href='mailto:support@jamoki.com'>support@jamoki.com</a> to request login credentials.
|
||||
</Message>
|
||||
</Form>
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<ValidatedCheckbox label='Remember Me'
|
||||
name='rememberMe' onChange={this.handleChange} validator={this.state.validator}
|
||||
message='Should we keep you logged in on this computer?' className='login-checkbox' />
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<ValidatedButton className='submit' name='submit' content='Login'
|
||||
submit validator={this.state.validator} />
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<Text>
|
||||
Please contact <Link to='mailto:support@jamoki.com'>support@jamoki.com</Link> to request login credentials.
|
||||
</Text>
|
||||
</StackLayout.Item>
|
||||
</StackLayout>
|
||||
</form>
|
||||
|
||||
<WaitDialog active={this.state.waitDialog} message='Logging In' />
|
||||
|
||||
@@ -121,7 +129,7 @@ export class Login extends React.Component {
|
||||
title={this.state.messageDialog ? this.state.messageDialog.title : ''}
|
||||
message={this.state.messageDialog ? this.state.messageDialog.message : ''}
|
||||
onDismiss={this.handleMessageDialogDismiss} />
|
||||
</Container>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#login .login-options { margin: 1.5em 0 3em 0; }
|
||||
#login .login-password { text-align: left; }
|
||||
#login .login-checkbox { text-align: right; }
|
||||
@@ -1,7 +1,6 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Container, Header, Form, Message } from 'semantic-ui-react'
|
||||
import './ResetPassword.scss'
|
||||
import { Text, StackLayout } from '../ui'
|
||||
import { Validator, ValidatedInput, ValidatedButton } from '../Validated'
|
||||
import { MessageDialog, WaitDialog } from '../Dialog'
|
||||
import { api } from '../helpers'
|
||||
@@ -62,23 +61,35 @@ export class ResetPassword extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Container className='password-reset-container'>
|
||||
<Header content='Reset Password' size='large' />
|
||||
<Form size='large' onSubmit={this.handleSubmit}>
|
||||
<ValidatedInput label='New Password' password name='newPassword'
|
||||
message='A new password, cannot be blank or the same as your old password'
|
||||
width={16} validator={this.state.validator} />
|
||||
<ValidatedInput label='Re-entered New Password' password name='reenteredNewPassword'
|
||||
message='The new password again, must match and cannot be blank'
|
||||
width={16} validator={this.state.validator} />
|
||||
<Message info>
|
||||
Passwords can contain special characters and are discouraged from being simple or reused from other sites or applications.
|
||||
<br /><br />
|
||||
Passwords must be at least 6 characters long.
|
||||
</Message>
|
||||
<ValidatedButton className='submit' name='submit' content='Submit'
|
||||
primary submit validator={this.state.validator} />
|
||||
</Form>
|
||||
<div>
|
||||
<form onSubmit={this.handleSubmit}>
|
||||
<StackLayout>
|
||||
<StackLayout.Item>
|
||||
<Text size='large'>Reset Password</Text>
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<ValidatedInput label='New Password' password name='newPassword'
|
||||
message='A new password, cannot be blank or the same as your old password'
|
||||
width={16} validator={this.state.validator} />
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<ValidatedInput label='Re-entered New Password' password name='reenteredNewPassword'
|
||||
message='The new password again, must match and cannot be blank'
|
||||
width={16} validator={this.state.validator} />
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<Text>
|
||||
Passwords can contain special characters and should be unique to this application.
|
||||
<br /><br />
|
||||
Passwords must be at least 6 characters long.
|
||||
</Text>
|
||||
</StackLayout.Item>
|
||||
<StackLayout.Item>
|
||||
<ValidatedButton className='submit' name='submit' content='Submit'
|
||||
submit validator={this.state.validator} />
|
||||
</StackLayout.Item>
|
||||
</StackLayout>
|
||||
</form>
|
||||
|
||||
<MessageDialog error open={!!this.state.messageDialog}
|
||||
title={this.state.messageDialog ? this.state.messageDialog.title : ''}
|
||||
@@ -87,7 +98,7 @@ export class ResetPassword extends React.Component {
|
||||
|
||||
<WaitDialog active={!!this.state.waitDialog}
|
||||
message={this.state.waitDialog ? this.state.waitDialog.message : ''} />
|
||||
</Container>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
.ui.container.password-reset-container {
|
||||
height: 80vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.ui.container.password-reset-container .header {
|
||||
border-bottom: 1px solid #d4d4d5;
|
||||
width: 40%;
|
||||
padding-bottom: 0.5em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.ui.container.password-reset-container form {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.ui.container.password-reset-container .message {
|
||||
margin: 2em 0;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
Reference in New Issue
Block a user