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
|
### Fixed
|
||||||
|
|
||||||
- Added ON DELETE to `most_recent_crawl` table, such that it can handle previously-crawled but now-dead instances.
|
- 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]
|
## [2.7.0 - 2018-08-18]
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,7 @@ class LoginScreen extends React.PureComponent<{}, ILoginScreenState> {
|
||||||
|
|
||||||
private renderChooseInstance = () => {
|
private renderChooseInstance = () => {
|
||||||
const { isGettingLoginTypes } = this.state;
|
const { isGettingLoginTypes } = this.state;
|
||||||
|
const onButtonClick = () => this.getLoginTypes();
|
||||||
return (
|
return (
|
||||||
<form onSubmit={this.getLoginTypes}>
|
<form onSubmit={this.getLoginTypes}>
|
||||||
<FormGroup label="Instance domain" labelFor="domain-input" disabled={isGettingLoginTypes} inline={true}>
|
<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}
|
rightIcon={IconNames.ARROW_RIGHT}
|
||||||
title="submit"
|
title="submit"
|
||||||
loading={isGettingLoginTypes}
|
loading={isGettingLoginTypes}
|
||||||
|
onClick={onButtonClick}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
placeholder="mastodon.social"
|
placeholder="mastodon.social"
|
||||||
|
@ -166,8 +168,10 @@ class LoginScreen extends React.PureComponent<{}, ILoginScreenState> {
|
||||||
this.setState({ domain: event.target.value });
|
this.setState({ domain: event.target.value });
|
||||||
};
|
};
|
||||||
|
|
||||||
private getLoginTypes = (e: React.FormEvent<HTMLFormElement>) => {
|
private getLoginTypes = (e?: React.FormEvent<HTMLFormElement>) => {
|
||||||
|
if (!!e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
}
|
||||||
this.setState({ isGettingLoginTypes: true });
|
this.setState({ isGettingLoginTypes: true });
|
||||||
let { domain } = this.state;
|
let { domain } = this.state;
|
||||||
if (domain.startsWith("https://")) {
|
if (domain.startsWith("https://")) {
|
||||||
|
|
Loading…
Reference in a new issue