terms of service, pop up new html

This commit is contained in:
Mashy 2019-10-09 15:42:50 +10:00
parent d339d19bb9
commit d8ff256735
3 changed files with 1126 additions and 3 deletions

View File

@ -10,7 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [0.1.5] - YYYY-MM-DD ## [0.1.5] - YYYY-MM-DD
### Changed ### Changed
`Recharge` Skill multiplier reduced 85/130/200 -> 70/110/170 `Recharge` Skill multiplier reduced 85/130/200 -> 70/110/170
`Absorbption` Skill duration reduced 5/7/9 -> 3/5/7 `Absorption` Skill duration reduced 5/7/9 -> 3/5/7
## [0.1.4 2019-09-18] ## [0.1.4 2019-09-18]

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@ const { Component } = require('preact')
const { connect } = require('preact-redux'); const { connect } = require('preact-redux');
const linkState = require('linkstate').default; const linkState = require('linkstate').default;
const tos = require('./tos');
const { postData, errorToast, infoToast } = require('../utils'); const { postData, errorToast, infoToast } = require('../utils');
const addState = connect( const addState = connect(
@ -34,7 +35,7 @@ function Register(args) {
submitRegister, submitRegister,
} = args; } = args;
const { password, confirm, name } = this.state; const { password, confirm, name, terms, viewTos } = this.state;
const registerSubmit = (event) => { const registerSubmit = (event) => {
event.preventDefault(); event.preventDefault();
@ -45,7 +46,7 @@ function Register(args) {
password === confirm; password === confirm;
const registerDisabled = () => { const registerDisabled = () => {
return !(registerConfirm() && password && name); return !(registerConfirm() && password && name && terms);
} }
return ( return (
@ -74,6 +75,14 @@ function Register(args) {
value={this.state.confirm} value={this.state.confirm}
onInput={linkState(this, 'confirm')} onInput={linkState(this, 'confirm')}
/> />
<div>
<input
type="checkbox"
onInput={linkState(this, 'terms')
}/>
&nbsp; Confirm agreement to terms of service &nbsp;
<button onClick={tos}> VIEW </button>
</div>
<button <button
class="login-btn" class="login-btn"
disabled={registerDisabled()} disabled={registerDisabled()}