SHA256
Полностью поддерживает английский язык
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { t } from '../i18n/index.js';
|
||||
import { confirmDialog } from '../components/confirm-dialog.js';
|
||||
|
||||
// Не обрезаем пароль: пробелы участвуют в формировании криптографических ключей.
|
||||
@@ -7,12 +8,12 @@ export function confirmPasswordBoundarySpaces(password) {
|
||||
const starts = /^\s/u.test(value);
|
||||
const ends = /\s$/u.test(value);
|
||||
if (!starts && !ends) return Promise.resolve(true);
|
||||
const where = starts && ends ? 'начинается и заканчивается пробелом'
|
||||
: starts ? 'начинается с пробела' : 'заканчивается пробелом';
|
||||
const where = starts && ends ? t('remaining.password.starts_and_ends_with_a_space')
|
||||
: starts ? t('remaining.password.starts_with_a_space') : t('remaining.password.ends_with_a_space');
|
||||
return confirmDialog({
|
||||
title: 'Пробел в пароле',
|
||||
text: `Ваш пароль ${where}. Такой пробел трудно заметить при следующем входе, но он является частью пароля и влияет на ключи доступа. Вы уверены, что хотите оставить его?`,
|
||||
confirmLabel: 'Да, оставить пароль',
|
||||
cancelLabel: 'Вернуться к паролю',
|
||||
title: t('remaining.password.space_in_password'),
|
||||
text: t('remaining.password.warning', { where }),
|
||||
confirmLabel: t('remaining.password.keep_password_as_entered'),
|
||||
cancelLabel: t('remaining.password.edit_password'),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user