Add 'under development' info to login/register
This commit is contained in:
parent
853def333e
commit
84cc616d06
@ -81,8 +81,8 @@ class BuildingEdit extends Component {
|
|||||||
if (res.error) {
|
if (res.error) {
|
||||||
this.setState({error: res.error})
|
this.setState({error: res.error})
|
||||||
} else {
|
} else {
|
||||||
this.props.selectBuilding(this.state);
|
this.props.selectBuilding(this.state); // could use server response?
|
||||||
this.props.history.push(`/building/${this.props.id}.html`)
|
this.props.history.push(`/building/${this.state.id}.html`);
|
||||||
}
|
}
|
||||||
}.bind(this)).catch(
|
}.bind(this)).catch(
|
||||||
(err) => this.setState({error: err})
|
(err) => this.setState({error: err})
|
||||||
|
@ -2,6 +2,7 @@ import React, { Component } from 'react';
|
|||||||
import { Redirect, Link } from 'react-router-dom';
|
import { Redirect, Link } from 'react-router-dom';
|
||||||
|
|
||||||
import ErrorBox from './error-box';
|
import ErrorBox from './error-box';
|
||||||
|
import InfoBox from './info-box';
|
||||||
|
|
||||||
class Login extends Component {
|
class Login extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@ -64,6 +65,8 @@ class Login extends Component {
|
|||||||
<article>
|
<article>
|
||||||
<section className="main-col">
|
<section className="main-col">
|
||||||
<h1 className="h2">Log in</h1>
|
<h1 className="h2">Log in</h1>
|
||||||
|
<InfoBox msg="Colouring London is under active development - at the moment, user accounts
|
||||||
|
and data may be deleted without notice. Caveat visitor!" />
|
||||||
<ErrorBox msg={this.state.error} />
|
<ErrorBox msg={this.state.error} />
|
||||||
<form onSubmit={this.handleSubmit}>
|
<form onSubmit={this.handleSubmit}>
|
||||||
<label htmlFor="username">Username*</label>
|
<label htmlFor="username">Username*</label>
|
||||||
|
@ -33,10 +33,12 @@ class ColouringMap extends Component {
|
|||||||
(res) => res.json()
|
(res) => res.json()
|
||||||
).then(function(data){
|
).then(function(data){
|
||||||
if (data.geometry_id && data.id){
|
if (data.geometry_id && data.id){
|
||||||
this.props.history.push(`/building/${data.id}.html`);
|
|
||||||
this.props.selectBuilding(data);
|
this.props.selectBuilding(data);
|
||||||
|
this.props.history.push(`/building/${data.id}.html`);
|
||||||
} else {
|
} else {
|
||||||
// this.props.selectBuilding(undefined); // TODO follow through back to maps
|
// should deselect but keep/return to expected colour theme
|
||||||
|
// this.props.selectBuilding(undefined);
|
||||||
|
// this.props.history.push(`/map/date_year.html`);
|
||||||
}
|
}
|
||||||
}.bind(this)).catch(
|
}.bind(this)).catch(
|
||||||
(err) => console.error(err)
|
(err) => console.error(err)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Redirect } from 'react-router';
|
import { Link, Redirect } from 'react-router-dom';
|
||||||
|
|
||||||
import ErrorBox from './error-box';
|
import ErrorBox from './error-box';
|
||||||
|
|
||||||
@ -36,7 +36,15 @@ class MyAccountPage extends Component {
|
|||||||
return (
|
return (
|
||||||
<article>
|
<article>
|
||||||
<section className="main-col">
|
<section className="main-col">
|
||||||
<h1 className="h3">Welcome, {this.props.user.username}</h1>
|
<h1 className="h1">Welcome, {this.props.user.username}!</h1>
|
||||||
|
<p className="lead">
|
||||||
|
|
||||||
|
Colouring London is under active development, please report any
|
||||||
|
bugs on <a href="http://github.com/tomalrussell/colouring-london/issues">
|
||||||
|
GitHub</a>.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
<Link to="/map/date_year.html" className="btn btn-primary">Start colouring</Link>
|
||||||
<ErrorBox msg={this.state.error} />
|
<ErrorBox msg={this.state.error} />
|
||||||
<form method="POST" action="/logout" onSubmit={this.handleSubmit}>
|
<form method="POST" action="/logout" onSubmit={this.handleSubmit}>
|
||||||
<input className="btn btn-secondary" type="submit" value="Log out"/>
|
<input className="btn btn-secondary" type="submit" value="Log out"/>
|
||||||
|
@ -2,6 +2,7 @@ import React, { Component } from 'react';
|
|||||||
import { Redirect, Link } from 'react-router-dom';
|
import { Redirect, Link } from 'react-router-dom';
|
||||||
|
|
||||||
import ErrorBox from './error-box';
|
import ErrorBox from './error-box';
|
||||||
|
import InfoBox from './info-box';
|
||||||
|
|
||||||
class SignUp extends Component {
|
class SignUp extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@ -67,6 +68,8 @@ class SignUp extends Component {
|
|||||||
<article>
|
<article>
|
||||||
<section className="main-col">
|
<section className="main-col">
|
||||||
<h1 className="h2">Sign up</h1>
|
<h1 className="h2">Sign up</h1>
|
||||||
|
<InfoBox msg="Colouring London is under active development - at the moment, user accounts
|
||||||
|
and data may be deleted without notice. Caveat visitor!" />
|
||||||
<p>
|
<p>
|
||||||
Create an account to start colouring in.
|
Create an account to start colouring in.
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user