mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-11-21 23:35:22 +03:00
Add seprate login button for access token (#61)
This commit is contained in:
parent
26862fa708
commit
60ae00ac14
1 changed files with 14 additions and 3 deletions
|
@ -270,12 +270,12 @@ const LoginPage = () => {
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
<FormDataConsumer>{formDataProps => <UserData {...formDataProps} />}</FormDataConsumer>
|
<FormDataConsumer>{formDataProps => <UserData {...formDataProps} />}</FormDataConsumer>
|
||||||
<CardActions className="actions">
|
{loginMethod === "credentials" && <CardActions className="actions">
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
type="submit"
|
type="submit"
|
||||||
color="primary"
|
color="primary"
|
||||||
disabled={loading || !supportPassAuth && loginMethod !== "accessToken"}
|
disabled={loading || !supportPassAuth}
|
||||||
fullWidth
|
fullWidth
|
||||||
>
|
>
|
||||||
{translate("ra.auth.sign_in")}
|
{translate("ra.auth.sign_in")}
|
||||||
|
@ -289,7 +289,18 @@ const LoginPage = () => {
|
||||||
>
|
>
|
||||||
{translate("synapseadmin.auth.sso_sign_in")}
|
{translate("synapseadmin.auth.sso_sign_in")}
|
||||||
</Button>
|
</Button>
|
||||||
</CardActions>
|
</CardActions>}
|
||||||
|
{loginMethod === "accessToken" && <CardActions className="actions">
|
||||||
|
<Button
|
||||||
|
variant="contained"
|
||||||
|
type="submit"
|
||||||
|
color="primary"
|
||||||
|
disabled={loading}
|
||||||
|
fullWidth
|
||||||
|
>
|
||||||
|
{translate("ra.auth.sign_in")}
|
||||||
|
</Button>
|
||||||
|
</CardActions>}
|
||||||
</Box>
|
</Box>
|
||||||
</Card>
|
</Card>
|
||||||
</LoginFormBox>
|
</LoginFormBox>
|
||||||
|
|
Loading…
Reference in a new issue