From cae2443dda3c8d62410283229076874765f71ce1 Mon Sep 17 00:00:00 2001 From: Drobysh Date: Thu, 1 Oct 2026 15:54:27 +0300 Subject: [PATCH] =?UTF-8?q?feat(haptic):=20=D0=B2=D0=B8=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=BD=D0=B0=207=20=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=86=D0=B0=D1=85=20=E2=80=94=20=D1=83=D1=80?= =?UTF-8?q?=D0=BE=D0=BA=D0=B8,=20=D1=82=D0=B5=D1=81=D1=82,=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=BA=D1=82=D0=B8=D0=BA=D0=B0,=20=D1=83=D1=87=D0=B8?= =?UTF-8?q?=D1=82=D0=B5=D0=BB=D1=8C,=20=D0=BB=D0=B5=D0=BA=D1=86=D0=B8?= =?UTF-8?q?=D0=B8,=20=D0=BF=D1=80=D0=BE=D0=B8=D0=B7=D0=BD=D0=BE=D1=88?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - LessonsPage: selection() на выбор уровня/темы, кнопка назад - LessonViewPage: selection() на ответ, heavy() на завершение урока - TestViewPage: selection() на ответ, heavy() на завершение, medium() на примеры/практику - PracticeViewPage: selection() на ответ, heavy() на завершение практики - TeacherChatPage: medium() на старт, success()/error() на ответ учителя - LecturesPage: selection() на открытие, medium() на скачивание - PronunciationPage: selection() на тап по слову, light() на следующее Глобальный useGlobalHaptic в App.tsx вешает light() на все кнопки. На кнопках с явным haptic — data-no-haptic="true" против двойной вибрации. --- src/pages/LecturesPage.tsx | 22 ++++++++++- src/pages/LessonViewPage.tsx | 9 +++++ src/pages/LessonsPage.tsx | 11 +++++- src/pages/PracticeViewPage.tsx | 9 +++++ src/pages/PronunciationPage.tsx | 67 ++++++++++++++++++++++----------- src/pages/TeacherChatPage.tsx | 23 +++++++++++ src/pages/TestViewPage.tsx | 23 ++++++++++- 7 files changed, 137 insertions(+), 27 deletions(-) diff --git a/src/pages/LecturesPage.tsx b/src/pages/LecturesPage.tsx index a83498a..370a66b 100644 --- a/src/pages/LecturesPage.tsx +++ b/src/pages/LecturesPage.tsx @@ -3,6 +3,7 @@ import { useNavigate } from 'react-router-dom'; import { Document, Page, pdfjs } from 'react-pdf'; import { useLanguage } from '../i18n/LanguageContext'; import { fonts, radius } from '../styles/theme'; +import { haptic } from '../haptic'; import { getLectures, type LectureListItem } from '../api'; // pdf.js worker + cMaps (для кириллицы и польских букв) @@ -78,6 +79,8 @@ const LecturesPage: React.FC = () => { }; const handleOpenLecture = (lecture: LectureListItem) => { + // 🔧 ФИКС (01.10.2026): haptic_lectures — открытие лекции + haptic.selection(); setActiveLecture(lecture); setPageNumber(1); setNumPages(0); @@ -94,6 +97,8 @@ const LecturesPage: React.FC = () => { }; const handleDownloadLecture = (lecture: LectureListItem) => { + // 🔧 ФИКС (01.10.2026): haptic_lectures — скачивание + haptic.medium(); const url = getFileUrl(lecture); if (window.Telegram?.WebApp?.downloadFile) { @@ -205,6 +210,7 @@ const LecturesPage: React.FC = () => { }} >