SHA256
Отключить мультиаккаунтность и уточнить статусы профиля
This commit is contained in:
@@ -8,6 +8,7 @@ export function confirmDialog({
|
||||
danger = false,
|
||||
aboveEditor = false,
|
||||
rememberChoice = null,
|
||||
infoOnly = false,
|
||||
} = {}) {
|
||||
return new Promise((resolve) => {
|
||||
const opener = document.activeElement;
|
||||
@@ -40,6 +41,10 @@ export function confirmDialog({
|
||||
}
|
||||
modal.querySelector('[data-answer="no"]').textContent = cancelLabel;
|
||||
modal.querySelector('[data-answer="yes"]').textContent = confirmLabel;
|
||||
if (infoOnly) {
|
||||
modal.querySelector('[data-answer="no"]').remove();
|
||||
modal.querySelector('.form-actions-grid').classList.add('form-actions-grid--single');
|
||||
}
|
||||
|
||||
const finish = (answer) => {
|
||||
document.removeEventListener('keydown', onKeydown, true);
|
||||
@@ -58,6 +63,6 @@ export function confirmDialog({
|
||||
});
|
||||
document.addEventListener('keydown', onKeydown, true);
|
||||
document.body.append(modal);
|
||||
modal.querySelector('[data-answer="no"]').focus();
|
||||
modal.querySelector(infoOnly ? '[data-answer="yes"]' : '[data-answer="no"]').focus();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user