generated from VLADIMIR/template_frontend
fix
This commit is contained in:
@@ -25,8 +25,8 @@ function closePasswordForm() {
|
||||
|
||||
async function changePassword() {
|
||||
if (!passwordUser.value || savingPassword.value) return
|
||||
if ([...newPassword.value].length < 8 || new TextEncoder().encode(newPassword.value).length > 72) {
|
||||
message.error('Пароль должен содержать минимум 8 символов и не более 72 байт')
|
||||
if ([...newPassword.value].length < 8 || [...newPassword.value].length > 16) {
|
||||
message.error('Пароль должен содержать минимум 8 символов и не более 16 символов')
|
||||
return
|
||||
}
|
||||
if (newPassword.value !== confirmPassword.value) {
|
||||
@@ -130,7 +130,7 @@ async function deleteRole(userId: number, role: string) {
|
||||
type="password"
|
||||
show-password-on="click"
|
||||
:disabled="savingPassword"
|
||||
placeholder="От 8 символов, не более 72 байт"
|
||||
placeholder="От 8 символов, не более 16 символов"
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="Повторите пароль" label-for="confirm-user-password">
|
||||
@@ -140,6 +140,7 @@ async function deleteRole(userId: number, role: string) {
|
||||
type="password"
|
||||
show-password-on="click"
|
||||
:disabled="savingPassword"
|
||||
placeholder="Повторите новый пароль"
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-flex justify="end">
|
||||
|
||||
Reference in New Issue
Block a user