Add seprate login button for access token (#61)

This commit is contained in:
Borislav Pantaleev 2024-10-19 15:03:46 +03:00 committed by GitHub
parent 26862fa708
commit 60ae00ac14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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>