diff --git a/frontend/my-materials.html b/frontend/my-materials.html index 99cb683..d70b9f6 100644 --- a/frontend/my-materials.html +++ b/frontend/my-materials.html @@ -267,7 +267,7 @@ window.moveMaterial = moveMaterial; async function delMaterial(id) { - if (!confirm('Удалить этот материал?')) return; + if (!await LS.confirm('Этот материал будет удалён безвозвратно.', { title: 'Удалить материал?', confirmText: 'Удалить' })) return; try { await LS.deleteMaterial(id); load(); } catch (e) { LS.toast(e.message || 'Ошибка', 'error'); } } @@ -363,7 +363,7 @@ const content = ``; const m = LS.modal({ title: 'Папка', content, size: 'sm', actions: [ { label: 'Удалить', onClick: async () => { - if (!confirm('Удалить папку? Материалы останутся (станут «Без папки»).')) return; + if (!await LS.confirm('Материалы из неё останутся и станут «Без папки».', { title: 'Удалить папку?', confirmText: 'Удалить' })) return; try { await LS.deleteMaterialCollection(id); m.close(); if (_filter.col === String(id)) _filter.col = 'all'; load(); } catch (e) { LS.toast(e.message || 'Ошибка', 'error'); } } },