Use input components for LoginPage

Change-Id: Icaaa579eaeaaafe183fb027e4d3bf206f8f5516a
This commit is contained in:
Michael Albert 2020-04-30 20:27:10 +02:00 committed by Manuel Stahl
parent dd022eab04
commit 8a4c0fe0fe

View File

@ -6,8 +6,10 @@ import {
useLocale, useLocale,
useSetLocale, useSetLocale,
useTranslate, useTranslate,
PasswordInput,
TextInput,
} from "react-admin"; } from "react-admin";
import { Field, Form } from "react-final-form"; import { Form } from "react-final-form";
import { import {
Avatar, Avatar,
Button, Button,
@ -155,29 +157,32 @@ const LoginPage = ({ theme }) => {
</Select> </Select>
</div> </div>
<div className={classes.input}> <div className={classes.input}>
<Field <TextInput
autoFocus
name="homeserver" name="homeserver"
component={renderInput} component={renderInput}
label={translate("synapseadmin.auth.homeserver")} label={translate("synapseadmin.auth.homeserver")}
disabled={loading} disabled={loading}
fullWidth
/> />
</div> </div>
<div className={classes.input}> <div className={classes.input}>
<Field <TextInput
autoFocus
name="username" name="username"
component={renderInput} component={renderInput}
label={translate("ra.auth.username")} label={translate("ra.auth.username")}
disabled={loading} disabled={loading}
fullWidth
/> />
</div> </div>
<div className={classes.input}> <div className={classes.input}>
<Field <PasswordInput
name="password" name="password"
component={renderInput} component={renderInput}
label={translate("ra.auth.password")} label={translate("ra.auth.password")}
type="password" type="password"
disabled={loading} disabled={loading}
fullWidth
/> />
</div> </div>
</div> </div>