mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-18 21:43:50 +08:00
feat: show the popover on the top when window's width too small and close popover when password options is empty (#3952)
This commit is contained in:
@ -607,7 +607,7 @@ class SignupPage extends React.Component {
|
||||
}
|
||||
} else if (signupItem.name === "Password") {
|
||||
return (
|
||||
<Popover placement="right" content={this.state.passwordPopover} open={this.state.passwordPopoverOpen}>
|
||||
<Popover placement={window.innerWidth >= 960 ? "right" : "top"} content={this.state.passwordPopover} open={this.state.passwordPopoverOpen}>
|
||||
<Form.Item
|
||||
name="password"
|
||||
className="signup-password"
|
||||
@ -635,7 +635,7 @@ class SignupPage extends React.Component {
|
||||
}}
|
||||
onFocus={() => {
|
||||
this.setState({
|
||||
passwordPopoverOpen: true,
|
||||
passwordPopoverOpen: application.organizationObj.passwordOptions?.length > 0,
|
||||
passwordPopover: PasswordChecker.renderPasswordPopover(application.organizationObj.passwordOptions, this.form.current?.getFieldValue("password") ?? ""),
|
||||
});
|
||||
}}
|
||||
|
Reference in New Issue
Block a user