From ed50cb49e500d71d110df49234e97909d141379d Mon Sep 17 00:00:00 2001 From: Maxim Dolgolyov Date: Thu, 4 Jun 2026 14:39:21 +0300 Subject: [PATCH] =?UTF-8?q?style(materials):=20=D0=BF=D0=BE=D0=B4=D1=82?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D0=B6=D0=B4=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=83?= =?UTF-8?q?=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=87=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B7=20LS.confirm=20=D0=B2=D0=BC=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=BE=20=D0=BD=D0=B0=D1=82=D0=B8=D0=B2=D0=BD=D0=BE=D0=B3=D0=BE?= =?UTF-8?q?=20confirm()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Удаление материала и папки теперь показывает стилизованную модалку (LS.confirm, danger) вместо браузерного диалога «Сообщение с localhost». Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/my-materials.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'); } } },