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 < 12 || new TextEncoder().encode(newPassword.value).length > 72) {
|
||||
message.error('Пароль должен содержать минимум 12 символов и не более 72 байт')
|
||||
if ([...newPassword.value].length < 8 || new TextEncoder().encode(newPassword.value).length > 72) {
|
||||
message.error('Пароль должен содержать минимум 8 символов и не более 72 байт')
|
||||
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="От 12 символов, не более 72 байт"
|
||||
placeholder="От 8 символов, не более 72 байт"
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="Повторите пароль" label-for="confirm-user-password">
|
||||
@@ -138,6 +138,7 @@ async function deleteRole(userId: number, role: string) {
|
||||
v-model:value="confirmPassword"
|
||||
:input-props="{ id: 'confirm-user-password', autocomplete: 'new-password' }"
|
||||
type="password"
|
||||
show-password-on="click"
|
||||
:disabled="savingPassword"
|
||||
/>
|
||||
</n-form-item>
|
||||
|
||||
Reference in New Issue
Block a user