Fixed CSS and request URLs

This commit is contained in:
2019-05-26 03:02:48 +10:00
parent 862abbdb31
commit f949617284
12 changed files with 62 additions and 62 deletions
+2 -2
View File
@@ -30,9 +30,9 @@ class PasswordReset extends React.Component {
}
return (
<div className='page' style={{justifyContent: 'center'}}>
<div className='page centered'>
<Panel />
<Link to='/' className='centered'>Return Home</Link>
<Link to='/'>Return Home</Link>
</div>
);
}
+7 -7
View File
@@ -164,28 +164,28 @@ class Profile extends React.Component {
<div className='row'>
<p className='col'>Recruits:</p>
<p className='col'>{this.state.recruits}</p>
<button className='col' style={{flex: '2 1 1.5%'}} onClick={() => this.sendRequest('/recruit')}>Recruit More</button>
<button className='col' style={{flex: '2 1 1.5%'}} onClick={() => this.sendRequest('/recruitrequest')}>Recruit More</button>
</div>
<div className='row'>
<p className='col'>Soldiers:</p>
<p className='col'>{this.state.soldiers}</p>
<button className='col' onClick={() => this.sendRequest('/train', this.props.username, 'soldier')}>Train (100 gold)</button>
<button className='col' onClick={() => this.sendRequest('/untrain', this.props.username, 'soldier')}>Untrain</button>
<button className='col' onClick={() => this.sendRequest('/trainrequest', this.props.username, 'soldier')}>Train (100 gold)</button>
<button className='col' onClick={() => this.sendRequest('/untrainrequest', this.props.username, 'soldier')}>Untrain</button>
</div>
<div className='row'>
<p className='col'>Spies:</p>
<p className='col'>{this.state.spies}</p>
<button className='col' onClick={() => this.sendRequest('/train', this.props.username, 'spy')}>Train (200 gold)</button>
<button className='col' onClick={() => this.sendRequest('/untrain', this.props.username, 'spy')}>Untrain</button>
<button className='col' onClick={() => this.sendRequest('/trainrequest', this.props.username, 'spy')}>Train (200 gold)</button>
<button className='col' onClick={() => this.sendRequest('/untrainrequest', this.props.username, 'spy')}>Untrain</button>
</div>
<div className='row'>
<p className='col'>Scientists:</p>
<p className='col'>{this.state.scientists}</p>
<button className='col' onClick={() => this.sendRequest('/train', this.props.username, 'scientist')}>Train (120 gold)</button>
<button className='col' onClick={() => this.sendRequest('/untrain', this.props.username, 'scientist')}>Untrain</button>
<button className='col' onClick={() => this.sendRequest('/trainrequest', this.props.username, 'scientist')}>Train (120 gold)</button>
<button className='col' onClick={() => this.sendRequest('/untrainrequest', this.props.username, 'scientist')}>Untrain</button>
</div>
</div>
);
+2 -2
View File
@@ -19,14 +19,14 @@ class Login extends React.Component {
};
return (
<div className='panel left'>
<div className='panel right'>
<h1>Login</h1>
<div className='warning' style={warningStyle}>
<p>{this.state.warning}</p>
</div>
<form action='/login' method='post' onSubmit={(e) => this.submit(e)}>
<form action='/loginrequest' method='post' onSubmit={(e) => this.submit(e)}>
<div>
<label>Email:</label>
<input type='text' name='email' value={this.state.email} onChange={this.updateEmail.bind(this)} />
+1 -1
View File
@@ -19,7 +19,7 @@ class Logout extends React.Component {
//build the XHR
let xhr = new XMLHttpRequest();
xhr.open('POST', '/logout', true);
xhr.open('POST', '/logoutrequest', true);
xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
xhr.send(JSON.stringify({
email: this.props.email,
+2 -2
View File
@@ -18,14 +18,14 @@ class PasswordChange extends React.Component {
};
return (
<div className='panel left'>
<div className='panel right'>
<h1>Change Password</h1>
<div className='warning' style={warningStyle}>
<p>{this.state.warning}</p>
</div>
<form action='/passwordchange' method='post' onSubmit={(e) => this.submit(e)}>
<form action='/passwordchangerequest' method='post' onSubmit={(e) => this.submit(e)}>
<div>
<label>Password:</label>
<input type='password' name='password' value={this.state.password} onChange={this.updatePassword.bind(this)} />
+2 -2
View File
@@ -16,14 +16,14 @@ class PasswordRecover extends React.Component {
};
return (
<div className='panel left'>
<div className='panel right'>
<h1>Recover Password</h1>
<div className='warning' style={warningStyle}>
<p>{this.state.warning}</p>
</div>
<form action='/passwordrecover' method='post' onSubmit={(e) => this.submit(e)}>
<form action='/passwordrecoverrequest' method='post' onSubmit={(e) => this.submit(e)}>
<div>
<label>Email:</label>
<input type='text' name='email' value={this.state.email} onChange={this.updateEmail.bind(this)} />
+2 -2
View File
@@ -19,14 +19,14 @@ class PasswordReset extends React.Component {
};
return (
<div className='panel center'>
<div className='panel right'>
<h1>Change Password</h1>
<div className='warning' style={warningStyle}>
<p>{this.state.warning}</p>
</div>
<form action='/passwordreset' method='post' onSubmit={(e) => this.submit(e)}>
<form action='/passwordresetrequest' method='post' onSubmit={(e) => this.submit(e)}>
<div>
<label>Password:</label>
<input type='password' name='password' value={this.state.password} onChange={this.updatePassword.bind(this)} />
+2 -2
View File
@@ -19,14 +19,14 @@ export default class Signup extends React.Component {
};
return (
<div className='panel left'>
<div className='panel right'>
<h1>Sign Up</h1>
<div className='warning' style={warningStyle}>
<p>{this.state.warning}</p>
</div>
<form action='/signup' method='post' onSubmit={(e) => this.submit(e)}>
<form action='/signuprequest' method='post' onSubmit={(e) => this.submit(e)}>
<div>
<label>Email:</label>
<input type='text' name='email' value={this.state.email} onChange={this.updateEmail.bind(this)} />