1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 18:30:53 +00:00

['settings' page] WebDav Password: redesigned the 'update password' dialog; fixup & improvement

This commit is contained in:
llj
2022-02-17 15:30:06 +08:00
parent 7ff103f69c
commit 57921f1b11
5 changed files with 30 additions and 31 deletions

View File

@@ -151,11 +151,11 @@ class GenerateUploadLink extends React.Component {
// check password params
if (showPasswordInput) {
if (password.length === 0) {
this.setState({errorInfo: gettext('Please enter password')});
this.setState({errorInfo: gettext('Please enter a password.')});
return false;
}
if (password.length < shareLinkPasswordMinLength) {
this.setState({errorInfo: gettext('Password is too short')});
this.setState({errorInfo: gettext('The password is too short.')});
return false;
}
if (password !== passwordnew) {
@@ -163,7 +163,7 @@ class GenerateUploadLink extends React.Component {
return false;
}
if (Utils.getStrengthLevel(password) < shareLinkPasswordStrengthLevel) {
this.setState({errorInfo: gettext('Password is too weak, should have at least {shareLinkPasswordStrengthLevel} of the following: num, upper letter, lower letter and other symbols'.replace('{shareLinkPasswordStrengthLevel}', shareLinkPasswordStrengthLevel))});
this.setState({errorInfo: 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}', shareLinkPasswordStrengthLevel)});
return false;
}
}
@@ -267,9 +267,9 @@ class GenerateUploadLink extends React.Component {
const { isSendLinkShown } = this.state;
let passwordLengthTip = gettext('(at least {passwordLength} characters and has {shareLinkPasswordStrengthLevel} of the following: num, upper letter, lower letter and other symbols)');
passwordLengthTip = passwordLengthTip.replace('{passwordLength}', shareLinkPasswordMinLength)
.replace('{shareLinkPasswordStrengthLevel}', shareLinkPasswordStrengthLevel);
let passwordLengthTip = gettext('(at least {passwordMinLength} characters and includes {passwordStrengthLevel} of the following: number, upper letter, lower letter and other symbols)');
passwordLengthTip = passwordLengthTip.replace('{passwordMinLength}', shareLinkPasswordMinLength)
.replace('{passwordStrengthLevel}', shareLinkPasswordStrengthLevel);
if (this.state.sharedUploadInfo) {
let sharedUploadInfo = this.state.sharedUploadInfo;