mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
Improve login page.
This commit is contained in:
parent
d11bb49eac
commit
437289438f
@ -95,7 +95,7 @@ class UrlTable extends React.Component {
|
||||
];
|
||||
|
||||
return (
|
||||
<Table columns={columns} dataSource={table.map(row => ({id: row}))} size="middle" bordered pagination={{pageSize: 100}}
|
||||
<Table rowKey="id" columns={columns} dataSource={table.map(row => ({id: row}))} size="middle" bordered pagination={{pageSize: 100}}
|
||||
title={() => (
|
||||
<div>
|
||||
{this.props.title}
|
||||
|
@ -108,6 +108,7 @@ class LoginPage extends React.Component {
|
||||
return Util.renderMessage(this.state.msg)
|
||||
}
|
||||
|
||||
if (application.enablePassword) {
|
||||
return (
|
||||
<Form
|
||||
name="normal_login"
|
||||
@ -156,11 +157,10 @@ class LoginPage extends React.Component {
|
||||
Auto login
|
||||
</Checkbox>
|
||||
</Form.Item>
|
||||
<a style={{float: "right"}} href="">
|
||||
<Link style={{float: "right"}} to="/forgot">
|
||||
Forgot password?
|
||||
</a>
|
||||
</Link>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item>
|
||||
<Button
|
||||
type="primary"
|
||||
@ -170,12 +170,16 @@ class LoginPage extends React.Component {
|
||||
>
|
||||
Login
|
||||
</Button>
|
||||
{
|
||||
!application.enableSignUp ? null : (
|
||||
<div style={{float: "right"}}>
|
||||
No account yet,
|
||||
<Link to={"/register"}>
|
||||
sign up now
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
{
|
||||
@ -190,6 +194,29 @@ class LoginPage extends React.Component {
|
||||
</Form.Item>
|
||||
</Form>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<div style={{marginTop: "20px"}}>
|
||||
<div style={{fontSize: 20, textAlign: "left"}}>
|
||||
Please click to login
|
||||
<a target="_blank" href={application.homepageUrl}>
|
||||
{application.displayName}
|
||||
</a>
|
||||
:
|
||||
</div>
|
||||
<br/>
|
||||
{
|
||||
application.providerObjs.map(provider => {
|
||||
return (
|
||||
<a key={provider.displayName} href={Provider.getAuthUrl(application, provider, "signup")}>
|
||||
<img width={60} height={60} src={Provider.getAuthLogo(provider)} alt={provider.displayName} style={{margin: "10px"}} />
|
||||
</a>
|
||||
);
|
||||
})
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
renderLogo(application) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user