mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-21 08:13:49 +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:
@ -385,7 +385,7 @@ class ForgetPage extends React.Component {
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<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="newPassword"
|
||||
hidden={this.state.current !== 2}
|
||||
@ -415,7 +415,7 @@ class ForgetPage extends React.Component {
|
||||
}}
|
||||
onFocus={() => {
|
||||
this.setState({
|
||||
passwordPopoverOpen: true,
|
||||
passwordPopoverOpen: application.organizationObj.passwordOptions?.length > 0,
|
||||
passwordPopover: PasswordChecker.renderPasswordPopover(application.organizationObj.passwordOptions, this.form.current?.getFieldValue("newPassword") ?? ""),
|
||||
});
|
||||
}}
|
||||
|
Reference in New Issue
Block a user