allow logging in w/ a click, not just enter
This commit is contained in:
parent
7427a78b65
commit
d5d4a5f0f0
|
@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Fixed
|
||||
|
||||
- Added ON DELETE to `most_recent_crawl` table, such that it can handle previously-crawled but now-dead instances.
|
||||
- You can now login to the admin view by clicking, not just by pressing enter.
|
||||
|
||||
## [2.7.0 - 2018-08-18]
|
||||
|
||||
|
|
|
@ -86,6 +86,7 @@ class LoginScreen extends React.PureComponent<{}, ILoginScreenState> {
|
|||
|
||||
private renderChooseInstance = () => {
|
||||
const { isGettingLoginTypes } = this.state;
|
||||
const onButtonClick = () => this.getLoginTypes();
|
||||
return (
|
||||
<form onSubmit={this.getLoginTypes}>
|
||||
<FormGroup label="Instance domain" labelFor="domain-input" disabled={isGettingLoginTypes} inline={true}>
|
||||
|
@ -101,6 +102,7 @@ class LoginScreen extends React.PureComponent<{}, ILoginScreenState> {
|
|||
rightIcon={IconNames.ARROW_RIGHT}
|
||||
title="submit"
|
||||
loading={isGettingLoginTypes}
|
||||
onClick={onButtonClick}
|
||||
/>
|
||||
}
|
||||
placeholder="mastodon.social"
|
||||
|
@ -166,8 +168,10 @@ class LoginScreen extends React.PureComponent<{}, ILoginScreenState> {
|
|||
this.setState({ domain: event.target.value });
|
||||
};
|
||||
|
||||
private getLoginTypes = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
private getLoginTypes = (e?: React.FormEvent<HTMLFormElement>) => {
|
||||
if (!!e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
this.setState({ isGettingLoginTypes: true });
|
||||
let { domain } = this.state;
|
||||
if (domain.startsWith("https://")) {
|
||||
|
|
Loading…
Reference in a new issue