1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 19:01:42 +00:00

fix code format (#6365)

This commit is contained in:
Michael An
2024-07-18 11:58:42 +08:00
committed by GitHub
parent c5d02b33b2
commit 67210c7363
450 changed files with 2425 additions and 2385 deletions

View File

@@ -26,16 +26,16 @@ class SetWebdavPassword extends Component {
submit = () => {
if (this.state.password.length === 0) {
this.setState({errMsg: gettext('Please enter a password.')});
this.setState({ errMsg: gettext('Please enter a password.') });
return false;
}
if (this.state.password.length < webdavSecretMinLength) {
this.setState({errMsg: gettext('The password is too short.')});
this.setState({ errMsg: gettext('The password is too short.') });
return false;
}
if (Utils.getStrengthLevel(this.state.password) < webdavSecretStrengthLevel) {
this.setState({errMsg: gettext('The password is too weak. It should include at least {passwordStrengthLevel} of the following: number, upper letter, lower letter and other symbols.').replace('{passwordStrengthLevel}', webdavSecretStrengthLevel)});
this.setState({ errMsg: gettext('The password is too weak. It should include at least {passwordStrengthLevel} of the following: number, upper letter, lower letter and other symbols.').replace('{passwordStrengthLevel}', webdavSecretStrengthLevel) });
return false;
}
@@ -47,7 +47,7 @@ class SetWebdavPassword extends Component {
};
handleInputChange = (e) => {
this.setState({password: e.target.value});
this.setState({ password: e.target.value });
};
togglePasswordVisible = () => {
@@ -75,7 +75,7 @@ class SetWebdavPassword extends Component {
<Input type={this.state.isPasswordVisible ? 'text' : 'password'} value={this.state.password} onChange={this.handleInputChange} autoComplete="new-password"/>
<InputGroupAddon addonType="append">
<Button onClick={this.togglePasswordVisible}>
<i className={`sf3-font sf3-font-eye${this.state.isPasswordVisible ? '': 'slash'}`}></i>
<i className={`sf3-font sf3-font-eye${this.state.isPasswordVisible ? '' : 'slash'}`}></i>
</Button>
<Button onClick={this.generatePassword}>
<i className="sf3-font sf3-font-magic"></i>