registerForm: RegisterForm;
loginLoading: boolean;
registerLoading: boolean;
+ spamNada: string;
}
},
loginLoading: false,
registerLoading: false,
+ spamNada: undefined
}
constructor(props: any, context: any) {
</div>
</div>
<input type="hidden" value={this.state.registerForm.spam_timer} />
+ <input type="text" class="d-none" value={this.state.spamNada} onInput={linkEvent(this, this.handleSpamNada)} />
<div class="form-group row">
<div class="col-sm-10">
<button type="submit" class="btn btn-secondary">{this.state.registerLoading ?
let elapsed = endTimer - i.state.registerForm.spam_timer;
i.state.registerForm.spam_timer = elapsed;
- if (elapsed > 1142) {
+ if (elapsed > 1142 && i.state.spamNada == undefined) {
WebSocketService.Instance.register(i.state.registerForm);
} else {
window.location.href = "https://github.com/dessalines/lemmy";
i.setState(i.state);
}
+ handleSpamNada(i: Login, event: any) {
+ i.state.spamNada = event.target.value;
+ i.setState(i.state);
+ }
+
handleRegisterEmailChange(i: Login, event: any) {
i.state.registerForm.email = event.target.value;
i.setState(i.state);